aboutsummaryrefslogtreecommitdiff
path: root/src/script/interpreter.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-02-16 10:46:22 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-02-16 10:46:34 +0100
commit93c85d458ac3e2c496c1a053e1f5925f55e29100 (patch)
tree6b26e898d0a727e57faa0c9b1d02f968b34b554c /src/script/interpreter.h
parent2d4f73f47e527520a541880c855220b9d5857f47 (diff)
parenta38107643f3f01cd92a4e6da9e7a9d025770ff37 (diff)
Merge #7524: BIP-112: Mempool-only CHECKSEQUENCEVERIFY
a381076 Code style fix. (BtcDrak) c3c3752 Separate CheckLockTime() and CheckSequence() logic (BtcDrak) 53e53a3 BIP112: Implement CHECKSEQUENCEVERIFY (Mark Friedenbach)
Diffstat (limited to 'src/script/interpreter.h')
-rw-r--r--src/script/interpreter.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/script/interpreter.h b/src/script/interpreter.h
index 7b34547ffb..e5cb7290f2 100644
--- a/src/script/interpreter.h
+++ b/src/script/interpreter.h
@@ -81,6 +81,11 @@ enum
//
// See BIP65 for details.
SCRIPT_VERIFY_CHECKLOCKTIMEVERIFY = (1U << 9),
+
+ // support CHECKSEQUENCEVERIFY opcode
+ //
+ // See BIP112 for details
+ SCRIPT_VERIFY_CHECKSEQUENCEVERIFY = (1U << 10),
};
bool CheckSignatureEncoding(const std::vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror);
@@ -100,6 +105,11 @@ public:
return false;
}
+ virtual bool CheckSequence(const CScriptNum& nSequence) const
+ {
+ return false;
+ }
+
virtual ~BaseSignatureChecker() {}
};
@@ -116,6 +126,7 @@ public:
TransactionSignatureChecker(const CTransaction* txToIn, unsigned int nInIn) : 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;
};
class MutableTransactionSignatureChecker : public TransactionSignatureChecker