| 575 | }; |
| 576 | |
| 577 | struct CScriptWitness |
| 578 | { |
| 579 | // Note that this encodes the data elements being pushed, rather than |
| 580 | // encoding them as a CScript that pushes them. |
| 581 | std::vector<std::vector<unsigned char> > stack; |
| 582 | |
| 583 | // Some compilers complain without a default constructor |
| 584 | CScriptWitness() = default; |
| 585 | |
| 586 | bool IsNull() const { return stack.empty(); } |
| 587 | |
| 588 | void SetNull() { stack.clear(); stack.shrink_to_fit(); } |
| 589 | |
| 590 | std::string ToString() const; |
| 591 | |
| 592 | bool operator==(const CScriptWitness&) const = default; |
| 593 | }; |
| 594 | |
| 595 | /** A reference to a CScript: the Hash160 of its serialization */ |
| 596 | class CScriptID : public BaseHash<uint160> |
no outgoing calls