| 629 | }; |
| 630 | |
| 631 | struct CScriptWitness |
| 632 | { |
| 633 | // Note that this encodes the data elements being pushed, rather than |
| 634 | // encoding them as a CScript that pushes them. |
| 635 | std::vector<std::vector<unsigned char> > stack{}; |
| 636 | |
| 637 | // Some compilers complain without a default constructor |
| 638 | CScriptWitness() { } |
| 639 | |
| 640 | bool IsNull() const { return stack.empty(); } |
| 641 | |
| 642 | void SetNull() { stack.clear(); stack.shrink_to_fit(); } |
| 643 | |
| 644 | std::string ToString() const; |
| 645 | |
| 646 | uint32_t GetSerializedSize() const; |
| 647 | }; |
| 648 | |
| 649 | /** Test for OP_SUCCESSx opcodes as defined by BIP342. */ |
| 650 | bool IsOpSuccess(const opcodetype& opcode); |
no outgoing calls