| 1296 | } |
| 1297 | |
| 1298 | bool TransactionSignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn, const vector<unsigned char>& vchPubKey, const CScript& scriptCode, SigVersion sigversion, uint32_t flags) const |
| 1299 | { |
| 1300 | CPubKey pubkey(vchPubKey); |
| 1301 | if (!pubkey.IsValid()) |
| 1302 | return false; |
| 1303 | |
| 1304 | // Hash type is one byte tacked on to the end of the signature |
| 1305 | vector<unsigned char> vchSig(vchSigIn); |
| 1306 | if (vchSig.empty()) |
| 1307 | return false; |
| 1308 | int nHashType = vchSig.back(); |
| 1309 | vchSig.pop_back(); |
| 1310 | |
| 1311 | uint256 sighash = SignatureHash(scriptCode, *txTo, nIn, nHashType, amount, sigversion, this->txdata); |
| 1312 | |
| 1313 | if (!VerifySignature(vchSig, pubkey, sighash, flags)) |
| 1314 | return false; |
| 1315 | |
| 1316 | return true; |
| 1317 | } |
| 1318 | |
| 1319 | bool TransactionSignatureChecker::CheckLockTime(const CScriptNum& nLockTime) const |
| 1320 | { |
no test coverage detected