Changeset View
Changeset View
Standalone View
Standalone View
src/script/sigcache.h
Show All 38 Lines | public: | ||||
} | } | ||||
}; | }; | ||||
class CachingTransactionSignatureChecker : public TransactionSignatureChecker { | class CachingTransactionSignatureChecker : public TransactionSignatureChecker { | ||||
private: | private: | ||||
bool store; | bool store; | ||||
bool IsCached(const std::vector<uint8_t> &vchSig, const CPubKey &vchPubKey, | bool IsCached(const std::vector<uint8_t> &vchSig, const CPubKey &vchPubKey, | ||||
const uint256 &sighash) const; | const uint256 &sighash, uint32_t flags) const; | ||||
public: | public: | ||||
CachingTransactionSignatureChecker(const CTransaction *txToIn, | CachingTransactionSignatureChecker(const CTransaction *txToIn, | ||||
unsigned int nInIn, | unsigned int nInIn, | ||||
const Amount amountIn, bool storeIn, | const Amount amountIn, bool storeIn, | ||||
PrecomputedTransactionData &txdataIn) | PrecomputedTransactionData &txdataIn) | ||||
: TransactionSignatureChecker(txToIn, nInIn, amountIn, txdataIn), | : TransactionSignatureChecker(txToIn, nInIn, amountIn, txdataIn), | ||||
store(storeIn) {} | store(storeIn) {} | ||||
bool VerifySignature(const std::vector<uint8_t> &vchSig, | bool VerifySignature(const std::vector<uint8_t> &vchSig, | ||||
const CPubKey &vchPubKey, | const CPubKey &vchPubKey, const uint256 &sighash, | ||||
const uint256 &sighash) const override; | uint32_t flags) const override; | ||||
friend class TestCachingTransactionSignatureChecker; | friend class TestCachingTransactionSignatureChecker; | ||||
}; | }; | ||||
void InitSignatureCache(); | void InitSignatureCache(); | ||||
#endif // BITCOIN_SCRIPT_SIGCACHE_H | #endif // BITCOIN_SCRIPT_SIGCACHE_H |