mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 19:23:41 +02:00
Move Hashers to util/hasher.{cpp/h}
Move the hashers that we use for hash tables to a common place. Moved hashers: - SaltedTxidHasher - SaltedOutpointHasher - FilterHeaderHasher - SignatureCacheHasher - BlockHasher
This commit is contained in:
@@ -9,15 +9,11 @@
|
||||
#include <chain.h>
|
||||
#include <flatfile.h>
|
||||
#include <index/base.h>
|
||||
#include <util/hasher.h>
|
||||
|
||||
/** Interval between compact filter checkpoints. See BIP 157. */
|
||||
static constexpr int CFCHECKPT_INTERVAL = 1000;
|
||||
|
||||
struct FilterHeaderHasher
|
||||
{
|
||||
size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); }
|
||||
};
|
||||
|
||||
/**
|
||||
* BlockFilterIndex is used to store and retrieve block filters, hashes, and headers for a range of
|
||||
* blocks by height. An index is constructed for each supported filter type with its own database
|
||||
|
||||
Reference in New Issue
Block a user