mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-12-25 09:36:44 +00:00
Fix address hashing
This commit is contained in:
parent
82e01f4c13
commit
e8f9e329a7
2 changed files with 14 additions and 1 deletions
|
@ -74,7 +74,7 @@ public class TransactionTask implements Runnable {
|
|||
}
|
||||
|
||||
builder.append(outputJoiner.toString());
|
||||
log.info(builder.toString());
|
||||
log.debug(builder.toString());
|
||||
|
||||
checkWallet(transaction);
|
||||
}
|
||||
|
|
|
@ -25,4 +25,17 @@ public abstract class Address {
|
|||
public abstract int getVersion();
|
||||
|
||||
public abstract Script getOutputScript();
|
||||
|
||||
public boolean equals(Object obj) {
|
||||
if(!(obj instanceof Address)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Address address = (Address)obj;
|
||||
return address.getAddress().equals(this.getAddress());
|
||||
}
|
||||
|
||||
public int hashCode() {
|
||||
return getAddress().hashCode();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue