MCPcopy Create free account
hub / github.com/bitcoinxt/bitcoinxt / IsDefinedHashtypeSignature

Function IsDefinedHashtypeSignature

src/script/interpreter.cpp:193–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191}
192
193static bool IsDefinedHashtypeSignature(const valtype &vchSig) {
194 if (vchSig.size() == 0) {
195 return false;
196 }
197 uint32_t nHashType = GetHashType(vchSig) & ~(SIGHASH_ANYONECANPAY | SIGHASH_FORKID);
198 if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
199 return false;
200
201 return true;
202}
203
204bool CheckSignatureEncoding(const vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror) {
205 // Empty signature. Not strictly DER encoded, but allowed to provide a

Callers 1

CheckSignatureEncodingFunction · 0.85

Calls 2

GetHashTypeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected