| 191 | } |
| 192 | |
| 193 | static 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 | |
| 204 | bool CheckSignatureEncoding(const vector<unsigned char> &vchSig, unsigned int flags, ScriptError* serror) { |
| 205 | // Empty signature. Not strictly DER encoded, but allowed to provide a |
no test coverage detected