diff options
| author | Luke Dashjr <[email protected]> | 2016-02-27 06:11:04 +0000 |
|---|---|---|
| committer | Luke Dashjr <[email protected]> | 2016-02-27 06:11:37 +0000 |
| commit | e5daa2e2aef61f0b9441d19f0b67015f426c6056 (patch) | |
| tree | 90a095dcd23c8a74cb605f55e224a902cba75a06 /src/script/script.h | |
| parent | Bugfix: gitian: Add curl to packages (now needed for depends) (diff) | |
| parent | Merge #7583: [doc] Fix typos (diff) | |
| download | discoin-e5daa2e2aef61f0b9441d19f0b67015f426c6056.tar.xz discoin-e5daa2e2aef61f0b9441d19f0b67015f426c6056.zip | |
Merge branch 'master' into depends_curl
Diffstat (limited to 'src/script/script.h')
| -rw-r--r-- | src/script/script.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/script/script.h b/src/script/script.h index 3650957fc..d2a68a07b 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -1,5 +1,5 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto -// Copyright (c) 2009-2014 The Bitcoin Core developers +// Copyright (c) 2009-2015 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. @@ -162,9 +162,10 @@ enum opcodetype // expansion OP_NOP1 = 0xb0, - OP_NOP2 = 0xb1, - OP_CHECKLOCKTIMEVERIFY = OP_NOP2, + OP_CHECKLOCKTIMEVERIFY = 0xb1, + OP_NOP2 = OP_CHECKLOCKTIMEVERIFY, OP_NOP3 = 0xb2, + OP_CHECKSEQUENCEVERIFY = OP_NOP3, OP_NOP4 = 0xb3, OP_NOP5 = 0xb4, OP_NOP6 = 0xb5, @@ -259,6 +260,11 @@ public: inline CScriptNum& operator+=( const CScriptNum& rhs) { return operator+=(rhs.m_value); } inline CScriptNum& operator-=( const CScriptNum& rhs) { return operator-=(rhs.m_value); } + inline CScriptNum operator&( const int64_t& rhs) const { return CScriptNum(m_value & rhs);} + inline CScriptNum operator&( const CScriptNum& rhs) const { return operator&(rhs.m_value); } + + inline CScriptNum& operator&=( const CScriptNum& rhs) { return operator&=(rhs.m_value); } + inline CScriptNum operator-() const { assert(m_value != std::numeric_limits<int64_t>::min()); @@ -287,6 +293,12 @@ public: return *this; } + inline CScriptNum& operator&=( const int64_t& rhs) + { + m_value &= rhs; + return *this; + } + int getint() const { if (m_value > std::numeric_limits<int>::max()) |