aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2015-02-03 08:15:51 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2015-02-03 08:26:08 +0100
commitf425050546644a36b0b8e0eb2f6934a3e0f6f80f (patch)
treee5fbeb4aa5f3fcc6109911b61156e1b1adbcfff2 /src/script/interpreter.cpp
parenta62649731fb1babaedff10b7c0baec4c50c90d60 (diff)
parent9fddceda44fb5592be179d783f0e5ac616c51c0d (diff)
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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/script/interpreter.cpp b/src/script/interpreter.cpp
index 0cee1a0116..af7c641c05 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;