diff options
| author | Wladimir J. van der Laan <[email protected]> | 2015-02-03 08:15:51 +0100 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2015-02-03 08:26:08 +0100 |
| commit | f425050546644a36b0b8e0eb2f6934a3e0f6f80f (patch) | |
| tree | e5fbeb4aa5f3fcc6109911b61156e1b1adbcfff2 /src/script/interpreter.cpp | |
| parent | Merge pull request #5731 (diff) | |
| parent | Avoid storing a reference passed to SignatureChecker constructors (diff) | |
| download | discoin-f425050546644a36b0b8e0eb2f6934a3e0f6f80f.tar.xz discoin-f425050546644a36b0b8e0eb2f6934a3e0f6f80f.zip | |
Merge pull request #5719
9fddced Avoid storing a reference passed to SignatureChecker constructors (Pieter Wuille)
858809a Use separate SignatureChecker for CMutableTransaction (Pieter Wuille)
Diffstat (limited to 'src/script/interpreter.cpp')
| -rw-r--r-- | src/script/interpreter.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp index 0cee1a011..af7c641c0 100644 --- a/src/script/interpreter.cpp +++ b/src/script/interpreter.cpp @@ -1058,12 +1058,12 @@ uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsig return ss.GetHash(); } -bool SignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const +bool TransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const { return pubkey.Verify(sighash, vchSig); } -bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode) const +bool TransactionSignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode) const { CPubKey pubkey(vchPubKey); if (!pubkey.IsValid()) @@ -1076,7 +1076,7 @@ bool SignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vec int nHashType = vchSig.back(); vchSig.pop_back(); - uint256 sighash = SignatureHash(scriptCode, txTo, nIn, nHashType); + uint256 sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType); if (!VerifySignature(vchSig, pubkey, sighash)) return false; |