add comment to transaction entry equals

This commit is contained in:
Craig Raw 2020-10-06 15:10:24 +02:00
parent 3c6adafc15
commit eda712e269

View file

@ -116,6 +116,8 @@ public class TransactionEntry extends Entry implements Comparable<TransactionEnt
if (this == o) return true; if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false; if (o == null || getClass() != o.getClass()) return false;
TransactionEntry that = (TransactionEntry) o; TransactionEntry that = (TransactionEntry) o;
// Even though the txid identifies a transaction, receiving an incomplete set of script hash notifications can result in some inputs/outputs for a tx being missing.
// To resolve this we check the number of children, but not the children themselves (since we don't care here when they are spent)
return wallet.equals(that.wallet) && blockTransaction.equals(that.blockTransaction) && getChildren().size() == that.getChildren().size(); return wallet.equals(that.wallet) && blockTransaction.equals(that.blockTransaction) && getChildren().size() == that.getChildren().size();
} }