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

Function CheckPubKeyEncoding

src/script/interpreter.cpp:236–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236bool static CheckPubKeyEncoding(const valtype &vchSig, unsigned int flags, const SigVersion &sigversion, ScriptError* serror) {
237 if ((flags & SCRIPT_VERIFY_STRICTENC) != 0 && !IsCompressedOrUncompressedPubKey(vchSig)) {
238 return set_error(serror, SCRIPT_ERR_PUBKEYTYPE);
239 }
240 // Only compressed keys are accepted in segwit
241 if ((flags & SCRIPT_VERIFY_WITNESS_PUBKEYTYPE) != 0 && sigversion == SIGVERSION_WITNESS_V0 && !IsCompressedPubKey(vchSig)) {
242 return set_error(serror, SCRIPT_ERR_WITNESS_PUBKEYTYPE);
243 }
244 return true;
245}
246
247bool static CheckMinimalPush(const valtype& data, opcodetype opcode) {
248 if (data.size() == 0) {

Callers 1

EvalScriptFunction · 0.85

Calls 3

IsCompressedPubKeyFunction · 0.85
set_errorFunction · 0.70

Tested by

no test coverage detected