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

Method IsPayToWitnessScriptHash

src/internal/script_view.cpp:74–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72 }
73
74 bool CScriptView::IsPayToWitnessScriptHash() const {
75 // Extra-fast test for pay-to-witness-script-hash CScripts:
76 return (this->size() == 34 &&
77 (*this)[0] == OP_0 &&
78 (*this)[1] == 0x20);
79 }
80
81 // A witness program is any valid CScript that consists of a 1-byte push opcode
82 // followed by a data push between 2 and 40 bytes.

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected