mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-01-18 21:32:35 +01:00
TransactionInput, TransactionOutput: compare parent tx using equals()
not object reference
This commit is contained in:
parent
7ef88e709e
commit
5f510d777b
@ -563,7 +563,7 @@ public class TransactionInput {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
TransactionInput other = (TransactionInput) o;
|
||||
return sequence == other.sequence && parent == other.parent
|
||||
return sequence == other.sequence && parent != null && parent.equals(other.parent)
|
||||
&& outpoint.equals(other.outpoint) && Arrays.equals(scriptBytes, other.scriptBytes);
|
||||
}
|
||||
|
||||
|
@ -443,7 +443,7 @@ public class TransactionOutput extends Message {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
TransactionOutput other = (TransactionOutput) o;
|
||||
return value == other.value && (parent == null || (parent == other.parent && getIndex() == other.getIndex()))
|
||||
return value == other.value && (parent == null || (parent.equals(other.parent) && getIndex() == other.getIndex()))
|
||||
&& Arrays.equals(scriptBytes, other.scriptBytes);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user