![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
SipHash-1-3-UJ based hasher for the coins cache and related coins containers. More...
#include <coins.h>
Public Member Functions | |
| SaltedCoinsCacheHasher (bool deterministic=false) | |
| size_t | operator() (const Txid &id) const noexcept |
| Hash a transaction ID, itself a cryptographic hash, as one jumbo block. | |
| size_t | operator() (const COutPoint &id) const noexcept |
| Hash an outpoint as its txid jumbo block followed by the zero-extended index as one normal block. | |
Private Attributes | |
| const SipHasher13UJ | m_hasher |
SipHash-1-3-UJ based hasher for the coins cache and related coins containers.
Retained entries identify real transaction outputs, so their keys contain computed txids. Missing-input lookups may contain arbitrary claimed prevouts, but FetchCoin() immediately erases their temporary entries when the backend lookup fails, so non-hash keys cannot accumulate.
The assumeutxo loader assumes snapshot txids are valid while loading and verifies the complete snapshot's content hash before activation.
Hash values are process-local and must not be persisted, serialized, or compared across processes.
Having the hash noexcept lets libstdc++ recalculate it during rehash instead of storing it in each node.
|
private |