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

Function IsDefinedHashtypeSignature

src/script/interpreter.cpp:196–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196bool static IsDefinedHashtypeSignature(const valtype &vchSig) {
197 if (vchSig.size() == 0) {
198 return false;
199 }
200 unsigned char nHashType = GetHashType(vchSig) & (~(SIGHASH_ANYONECANPAY | SIGHASH_FORKID));
201 if (nHashType < SIGHASH_ALL || nHashType > SIGHASH_SINGLE)
202 return false;
203
204 return true;
205}
206
207bool static UsesForkId(uint32_t nHashType) {
208 return nHashType & SIGHASH_FORKID;

Callers 1

CheckSignatureEncodingFunction · 0.85

Calls 2

GetHashTypeFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected