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

Method IsPayToPubkey

src/script/script.cpp:305–316  ·  view source on GitHub ↗

//////////////////////////////////////////////////// // lux

Source from the content-addressed store, hash-verified

303
304///////////////////////////////////////////////////////// // lux
305bool CScript::IsPayToPubkey() const
306{
307 if (this->size() == 35 && (*this)[0] == 33 && (*this)[34] == OP_CHECKSIG
308 && ((*this)[1] == 0x02 || (*this)[1] == 0x03)) {
309 return true;
310 }
311 if (this->size() == 67 && (*this)[0] == 65 && (*this)[66] == OP_CHECKSIG
312 && (*this)[1] == 0x04) {
313 return true;
314 }
315 return false;
316}
317
318bool CScript::IsPayToPubkeyHash() const
319{

Callers 2

addSpentIndexMethod · 0.80
CheckSenderScriptFunction · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected