6 #ifndef BITCOIN_SCRIPT_SIGCACHE_H 7 #define BITCOIN_SCRIPT_SIGCACHE_H 32 template <u
int8_t hash_select>
34 static_assert(hash_select < 8,
35 "SignatureCacheHasher only has 8 hashes available.");
37 std::memcpy(&u, key.
begin() + 4 * hash_select, 4);
46 bool IsCached(
const std::vector<uint8_t> &vchSig,
const CPubKey &vchPubKey,
52 const Amount amountIn,
bool storeIn,
57 bool VerifySignature(
const std::vector<uint8_t> &vchSig,
59 const uint256 &sighash)
const override;
61 friend class TestCachingTransactionSignatureChecker;
66 #endif // BITCOIN_SCRIPT_SIGCACHE_H static const unsigned int DEFAULT_MAX_SIG_CACHE_SIZE
Precompute sighash midstate to avoid quadratic hashing.
void InitSignatureCache()
We're hashing a nonce into the entries themselves, so we don't need extra blinding in the set hash co...
An encapsulated public key.
CachingTransactionSignatureChecker(const CTransaction *txToIn, unsigned int nInIn, const Amount amountIn, bool storeIn, PrecomputedTransactionData &txdataIn)
static const int64_t MAX_MAX_SIG_CACHE_SIZE
The basic transaction that is broadcasted on the network and contained in blocks. ...
uint32_t operator()(const uint256 &key) const