diff options
author | Amiti Uttarwar <amiti@uttarwar.org> | 2021-09-03 17:26:10 -0700 |
---|---|---|
committer | Amiti Uttarwar <amiti@uttarwar.org> | 2021-09-28 19:02:34 -0400 |
commit | 40acd6fc9a8098fed85abf4fb727a5f0dff8a2ff (patch) | |
tree | b296c45f8f3d530a9ff7ccbd4749670a5730342d /src/addrman_impl.h | |
parent | 7cf41bbb38db5008f9b69037b88138076d6a6cc5 (diff) | |
download | bitcoin-40acd6fc9a8098fed85abf4fb727a5f0dff8a2ff.tar.xz |
[move-only] Move constants to test-only header
Review hint: git diff --color-moved=dimmed-zebra
--color-moved-ws=ignore-all-space
Diffstat (limited to 'src/addrman_impl.h')
-rw-r--r-- | src/addrman_impl.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/addrman_impl.h b/src/addrman_impl.h index 8da814b147..1d13df803d 100644 --- a/src/addrman_impl.h +++ b/src/addrman_impl.h @@ -5,6 +5,16 @@ #ifndef BITCOIN_ADDRMAN_IMPL_H #define BITCOIN_ADDRMAN_IMPL_H +/** Total number of buckets for tried addresses */ +static constexpr int32_t ADDRMAN_TRIED_BUCKET_COUNT_LOG2{8}; +static constexpr int ADDRMAN_TRIED_BUCKET_COUNT{1 << ADDRMAN_TRIED_BUCKET_COUNT_LOG2}; +/** Total number of buckets for new addresses */ +static constexpr int32_t ADDRMAN_NEW_BUCKET_COUNT_LOG2{10}; +static constexpr int ADDRMAN_NEW_BUCKET_COUNT{1 << ADDRMAN_NEW_BUCKET_COUNT_LOG2}; +/** Maximum allowed number of entries in buckets for new and tried addresses */ +static constexpr int32_t ADDRMAN_BUCKET_SIZE_LOG2{6}; +static constexpr int ADDRMAN_BUCKET_SIZE{1 << ADDRMAN_BUCKET_SIZE_LOG2}; + /** * Extended statistics about a CAddress */ |