aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2016-03-31 14:51:29 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2016-06-22 15:43:00 +0200
commit0ef1dd3e11dd573b6e443852ef0c72e34093ac68 (patch)
tree5fb4e54e732902ea296636877f2cd81dfd4f4b29 /src/script/interpreter.h
parentb8a97498df1e83f8dcc49bc3fa4344f9e9799242 (diff)
downloadbitcoin-0ef1dd3e11dd573b6e443852ef0c72e34093ac68.tar.xz
Refactor script validation to observe amounts
This is a preparation for BIP143 support.
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r--src/script/interpreter.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index d1459ed620..6f13e75d78 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -131,7 +131,7 @@ protected:
virtual bool VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& vchPubKey, const uint256& sighash) const;
public:
- TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn) : txTo(txToIn), nIn(nInIn) {}
+ TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn, const CAmount& amount) : txTo(txToIn), nIn(nInIn) {}
bool CheckSig(const std::vector<unsigned char>& scriptSig, const std::vector<unsigned char>& vchPubKey, const CScript& scriptCode) const;
bool CheckLockTime(const CScriptNum& nLockTime) const;
bool CheckSequence(const CScriptNum& nSequence) const;
@@ -143,7 +143,7 @@ private:
const CTransaction txTo;
public:
- MutableTransactionSignatureChecker(const CMutableTransaction* txToIn, unsigned int nInIn) : TransactionSignatureChecker(&txTo, nInIn), txTo(*txToIn) {}
+ MutableTransactionSignatureChecker(const CMutableTransaction* txToIn, unsigned int nInIn, const CAmount& amount) : TransactionSignatureChecker(&txTo, nInIn, amount), txTo(*txToIn) {}
};
bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript& script, unsigned int flags, const BaseSignatureChecker& checker, ScriptError* error = NULL);