Fix address hashing

This commit is contained in:
Craig Raw 2019-03-29 15:06:23 +02:00
parent 82e01f4c13
commit e8f9e329a7
2 changed files with 14 additions and 1 deletions

View file

@ -74,7 +74,7 @@ public class TransactionTask implements Runnable {
} }
builder.append(outputJoiner.toString()); builder.append(outputJoiner.toString());
log.info(builder.toString()); log.debug(builder.toString());
checkWallet(transaction); checkWallet(transaction);
} }

View file

@ -25,4 +25,17 @@ public abstract class Address {
public abstract int getVersion(); public abstract int getVersion();
public abstract Script getOutputScript(); 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();
}
} }