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

Method IsPayToWitnessScriptHash

src/internal/bitcoin_script.cpp:211–217  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

209 }
210
211 bool CScript::IsPayToWitnessScriptHash() const
212 {
213 // Extra-fast test for pay-to-witness-script-hash CScripts:
214 return (this->size() == 34 &&
215 (*this)[0] == OP_0 &&
216 (*this)[1] == 0x20);
217 }
218
219 // A witness program is any valid CScript that consists of a 1-byte push opcode
220 // 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