diff options
author | Andrew Chow <achow101-github@achow101.com> | 2019-09-17 17:02:56 -0400 |
---|---|---|
committer | Andrew Chow <achow101-github@achow101.com> | 2020-11-10 14:33:37 -0500 |
commit | 95e61c1cf2a91d041c8025306ba36f0ea2806894 (patch) | |
tree | 225cae6060841c5049f9722b48776dd8901d4f59 /src/validation.h | |
parent | 42f950cb27b732782d55282cdcd934396fcd7071 (diff) |
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
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/validation.h b/src/validation.h index 3d9fa92c15..a3dc0b75af 100644 --- a/src/validation.h +++ b/src/validation.h @@ -23,6 +23,7 @@ #include <txdb.h> #include <versionbits.h> #include <serialize.h> +#include <util/hasher.h> #include <atomic> #include <map> @@ -94,14 +95,6 @@ static const unsigned int DEFAULT_CHECKLEVEL = 3; // Setting the target to >= 550 MiB will make it likely we can respect the target. static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024; -struct BlockHasher -{ - // this used to call `GetCheapHash()` in uint256, which was later moved; the - // cheap hash function simply calls ReadLE64() however, so the end result is - // identical - size_t operator()(const uint256& hash) const { return ReadLE64(hash.begin()); } -}; - /** Current sync state passed to tip changed callbacks. */ enum class SynchronizationState { INIT_REINDEX, |