Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Wallet
ExtLibJ
Commits
b5b59406
Commit
b5b59406
authored
Oct 13, 2021
by
zeroleak
Browse files
add PushTxAddressReuseException.adressReuseOutputIndexs
parent
e05f9012
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
3 deletions
+24
-3
java/com/samourai/wallet/api/backend/BackendApi.java
java/com/samourai/wallet/api/backend/BackendApi.java
+2
-1
java/com/samourai/wallet/api/backend/beans/PushTxAddressReuseException.java
...wallet/api/backend/beans/PushTxAddressReuseException.java
+14
-2
java/com/samourai/wallet/api/backend/beans/PushTxResponse.java
...com/samourai/wallet/api/backend/beans/PushTxResponse.java
+8
-0
No files found.
java/com/samourai/wallet/api/backend/BackendApi.java
View file @
b5b59406
...
...
@@ -216,7 +216,8 @@ public class BackendApi {
// address reuse
if
(
pushTxResponse
.
error
!=
null
&&
PushTxResponse
.
PushTxError
.
CODE_VIOLATION_STRICT_MODE_VOUTS
.
equals
(
pushTxResponse
.
error
.
code
))
{
throw
new
PushTxAddressReuseException
();
Collection
<
Integer
>
adressReuseOutputIndexs
=
(
Collection
<
Integer
>)
pushTxResponse
.
error
.
message
;
throw
new
PushTxAddressReuseException
(
adressReuseOutputIndexs
);
}
// other error
...
...
java/com/samourai/wallet/api/backend/beans/PushTxAddressReuseException.java
View file @
b5b59406
package
com.samourai.wallet.api.backend.beans
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.LinkedList
;
import
java.util.List
;
public
class
PushTxAddressReuseException
extends
Exception
{
public
PushTxAddressReuseException
()
{
super
();
private
List
<
Integer
>
adressReuseOutputIndexs
;
public
PushTxAddressReuseException
(
Collection
<
Integer
>
adressReuseOutputIndexs
)
{
super
(
"Address reuse detected for outputs: "
+
Arrays
.
toString
(
adressReuseOutputIndexs
.
toArray
()));
this
.
adressReuseOutputIndexs
=
new
LinkedList
<>(
adressReuseOutputIndexs
);
}
public
List
<
Integer
>
getAdressReuseOutputIndexs
()
{
return
adressReuseOutputIndexs
;
}
}
java/com/samourai/wallet/api/backend/beans/PushTxResponse.java
View file @
b5b59406
...
...
@@ -16,6 +16,14 @@ public class PushTxResponse {
public
Object
message
;
public
String
code
;
@Override
public
String
toString
()
{
return
"PushTxError{"
+
"message="
+
message
+
", code='"
+
code
+
'\''
+
'}'
;
}
}
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment