MCPcopy Create free account
hub / github.com/LUX-Core/lux / IsPayToWitnessPubkeyHash

Method IsPayToWitnessPubkeyHash

src/script/script.cpp:338–344  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338bool CScript::IsPayToWitnessPubkeyHash() const
339{
340 // Extra-fast test for pay-to-witness-pubkey-hash CScripts:
341 return (this->size() == 22 &&
342 (*this)[0] == OP_0 &&
343 (*this)[1] == 0x14);
344}
345
346// A witness program is any valid CScript that consists of a 1-byte push opcode
347// followed by a data push between 2 and 40 bytes.

Callers 2

addSpentIndexMethod · 0.80
GetHashForDestinationFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected