wallet: IsEquivalentTo should strip witness data in addition to scriptsigs
This commit is contained in:
1 parent
157bbd0a07
commit
e9331cd6ab
1 file changed
+8
-2
@@ -13,8 +13,14 @@ bool CWalletTx::IsEquivalentTo(const CWalletTx& _tx) const
|
|||||||
{
|
{
|
||||||
CMutableTransaction tx1 {*this->tx};
|
CMutableTransaction tx1 {*this->tx};
|
||||||
CMutableTransaction tx2 {*_tx.tx};
|
CMutableTransaction tx2 {*_tx.tx};
|
||||||
for (auto& txin : tx1.vin) txin.scriptSig = CScript();
|
for (auto& txin : tx1.vin) {
|
||||||
for (auto& txin : tx2.vin) txin.scriptSig = CScript();
|
txin.scriptSig = CScript();
|
||||||
|
txin.scriptWitness.SetNull();
|
||||||
|
}
|
||||||
|
for (auto& txin : tx2.vin) {
|
||||||
|
txin.scriptSig = CScript();
|
||||||
|
txin.scriptWitness.SetNull();
|
||||||
|
}
|
||||||
return CTransaction(tx1) == CTransaction(tx2);
|
return CTransaction(tx1) == CTransaction(tx2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user