MCPcopy Create free account
hub / github.com/citp/BlockSci / IsPushOnly

Method IsPushOnly

src/internal/script_view.cpp:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106 }
107
108 bool CScriptView::IsPushOnly(iterator pc) const {
109 while (pc < end()) {
110 opcodetype opcode;
111 if (!GetOp(pc, opcode)) {
112 return false;
113 }
114 // Note that IsPushOnly() *does* consider OP_RESERVED to be a
115 // push-type opcode, however execution of OP_RESERVED fails, so
116 // it's not relevant to P2SH/BIP62 as the scriptSig would fail prior to
117 // the P2SH special validation code being executed.
118 if (opcode > OP_16) {
119 return false;
120 }
121 }
122 return true;
123 }
124
125 bool CScriptView::IsPushOnly() const {
126 return this->IsPushOnly(begin());

Callers 1

extractScriptDataFunction · 0.45

Calls 2

endFunction · 0.50
beginFunction · 0.50

Tested by

no test coverage detected