| 194 | } |
| 195 | |
| 196 | bool 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 | |
| 207 | bool static UsesForkId(uint32_t nHashType) { |
| 208 | return nHashType & SIGHASH_FORKID; |
no test coverage detected