5#ifndef BITCOIN_UTIL_HASHER_H
6#define BITCOIN_UTIL_HASHER_H
39 return hash(block_hash);
82 template <u
int8_t hash_select>
84 static_assert(hash_select < 8,
85 "SignatureCacheHasher only has 8 hashes available.");
87 std::memcpy(&u, key.
begin() + 4 * hash_select, 4);
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,...
SaltedOutpointHasher(bool deterministic=false)
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
static uint64_t ReadLE64(const uint8_t *ptr)
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.