diff options
author | Tom Harding <tomh@thinlink.com> | 2015-03-11 16:48:53 -0700 |
---|---|---|
committer | Tom Harding <tomh@thinlink.com> | 2015-04-11 19:03:58 -0700 |
commit | b2b361926215eadd6bf43ed1d7110b925fc7cae5 (patch) | |
tree | 82db9091d3556b309368bbe63806602ef26cfe87 /src/wallet | |
parent | c8a13501196fc79a3f728683b74f9d586dda46c1 (diff) |
Implement CTransaction::IsEquivalentTo(...)
Define CTransaction::IsEquivalentTo(const CTransaction& tx)
True if only scriptSigs are different. In other words, true if
the two transactions are malleability clones. In other words,
true if the two transactions have the same effect on the
outside universe.
In the wallet, only SyncMetaData for equivalent transactions.
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 2566b2712b..92bb972cf3 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -417,6 +417,7 @@ void CWallet::SyncMetaData(pair<TxSpends::iterator, TxSpends::iterator> range) const uint256& hash = it->second; CWalletTx* copyTo = &mapWallet[hash]; if (copyFrom == copyTo) continue; + if (!copyFrom->IsEquivalentTo(*copyTo)) continue; copyTo->mapValue = copyFrom->mapValue; copyTo->vOrderForm = copyFrom->vOrderForm; // fTimeReceivedIsTxTime not copied on purpose |