Avoid storing a reference passed to SignatureChecker constructors

Rebased-From: 9fddceda44
Github-Pull: #5719
This commit is contained in:
Pieter Wuille 2015-01-27 10:01:31 -04:00 committed by Wladimir J. van der Laan
parent 1bbad80bf4
commit 2448d34298
No known key found for this signature in database
GPG key ID: 74810B012346C9A6
12 changed files with 36 additions and 36 deletions

View file

@ -123,7 +123,7 @@ bool SignSignature(const CKeyStore &keystore, const CScript& fromPubKey, CMutabl
}
// Test solution
return VerifyScript(txin.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(txTo, nIn));
return VerifyScript(txin.scriptSig, fromPubKey, STANDARD_SCRIPT_VERIFY_FLAGS, MutableTransactionSignatureChecker(&txTo, nIn));
}
bool SignSignature(const CKeyStore &keystore, const CTransaction& txFrom, CMutableTransaction& txTo, unsigned int nIn, int nHashType)
@ -174,7 +174,7 @@ static CScript CombineMultisig(const CScript& scriptPubKey, const CTransaction&
if (sigs.count(pubkey))
continue; // Already got a sig for this pubkey
if (TransactionSignatureChecker(txTo, nIn).CheckSig(sig, pubkey, scriptPubKey))
if (TransactionSignatureChecker(&txTo, nIn).CheckSig(sig, pubkey, scriptPubKey))
{
sigs[pubkey] = sig;
break;