Check whether this node is valid at all.
| 1673 | |
| 1674 | //! Check whether this node is valid at all. |
| 1675 | bool IsValid() const { |
| 1676 | if (GetType() == ""_mst) return false; |
| 1677 | return ScriptSize() <= internal::MaxScriptSize(m_script_ctx); |
| 1678 | } |
| 1679 | |
| 1680 | //! Check whether this node is valid as a script on its own. |
| 1681 | bool IsValidTopLevel() const { return IsValid() && GetType() << "B"_mst; } |