| 75 | } |
| 76 | |
| 77 | bool CachingTransactionSignatureChecker::VerifySignature(const std::vector<unsigned char>& vchSig, const CPubKey& pubkey, const uint256& sighash) const |
| 78 | { |
| 79 | static CSignatureCache signatureCache; |
| 80 | |
| 81 | if (signatureCache.Get(sighash, vchSig, pubkey)) |
| 82 | return true; |
| 83 | |
| 84 | if (!TransactionSignatureChecker::VerifySignature(vchSig, pubkey, sighash)) |
| 85 | return false; |
| 86 | |
| 87 | if (store) |
| 88 | signatureCache.Set(sighash, vchSig, pubkey); |
| 89 | return true; |
| 90 | } |