5#ifndef BITCOIN_UTIL_HASHER_H
6#define BITCOIN_UTIL_HASHER_H
39 return hash(block_hash);
82 template <u
int8_t hash_select>
85 "SignatureCacheHasher only has 8 hashes available.");
An outpoint - a combination of a transaction hash and an index n into its vout.
size_t operator()(const BlockHash &block_hash) const
size_t operator()(const COutPoint &outpoint) const noexcept
Having the hash noexcept allows libstdc++'s unordered_map to recalculate the hash during rehash,...
size_t operator()(const Span< const uint8_t > &script) const
size_t operator()(const TxId &txid) const
size_t hash(const uint256 &h) const
size_t operator()(const uint256 &h) const
We're hashing a nonce into the entries themselves, so we don't need extra blinding in the set hash co...
uint32_t operator()(const uint256 &key) const
A Span is an object that can refer to a contiguous sequence of objects.
static uint64_t ReadLE64(const uint8_t *ptr)
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
uint64_t SipHashUint256Extra(uint64_t k0, uint64_t k1, const uint256 &val, uint32_t extra)
uint64_t SipHashUint256(uint64_t k0, uint64_t k1, const uint256 &val)
Optimized SipHash-2-4 implementation for uint256.
CScript GetScriptForDestination(const CTxDestination &dest)
Generate a Bitcoin scriptPubKey for the given CTxDestination.
std::variant< CNoDestination, PKHash, ScriptHash > CTxDestination
A txout script template with a specific destination.
A BlockHash is a unqiue identifier for a block.
Maintain a map of CBlockIndex for all known headers.
size_t operator()(const BlockHash &hash) const
size_t operator()(const CTxDestination &dest) const
A TxId is the identifier of a transaction.