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

Method IsPayToScriptHash

src/internal/script_view.cpp:66–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64 }
65
66 bool CScriptView::IsPayToScriptHash() const {
67 // Extra-fast test for pay-to-script-hash CScripts:
68 return (this->size() == 23 &&
69 (*this)[0] == OP_HASH160 &&
70 (*this)[1] == 0x14 &&
71 (*this)[22] == OP_EQUAL);
72 }
73
74 bool CScriptView::IsPayToWitnessScriptHash() const {
75 // Extra-fast test for pay-to-witness-script-hash CScripts:

Callers 1

extractScriptDataFunction · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected