diff options
Diffstat (limited to 'src/script/script.h')
-rw-r--r-- | src/script/script.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/script/script.h b/src/script/script.h index a2941ce901..71af3754bc 100644 --- a/src/script/script.h +++ b/src/script/script.h @@ -621,6 +621,8 @@ public: unsigned int GetSigOpCount(const CScript& scriptSig) const; bool IsPayToScriptHash() const; + bool IsPayToWitnessScriptHash() const; + bool IsWitnessProgram(int& version, std::vector<unsigned char>& program) const; /** Called by IsStandardTx and P2SH/BIP62 VerifyScript (which makes it consensus-critical). */ bool IsPushOnly(const_iterator pc) const; @@ -643,6 +645,20 @@ public: } }; +struct CScriptWitness +{ + // Note that this encodes the data elements being pushed, rather than + // encoding them as a CScript that pushes them. + std::vector<std::vector<unsigned char> > stack; + + // Some compilers complain without a default constructor + CScriptWitness() { } + + bool IsNull() const { return stack.empty(); } + + std::string ToString() const; +}; + class CReserveScript { public: |