diff options
author | Carl Dong <contact@carldong.me> | 2022-06-21 10:37:10 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-06-28 15:42:40 -0400 |
commit | 1ecc77321deb61b9f6888e4e10752b9d972fd26e (patch) | |
tree | dd7b4c8f4800c3d250c2c7cd477c7d0080bda8e7 /src/kernel | |
parent | aa9141cd8185cb7ad532bc16feb9d302b05d9697 (diff) | |
download | bitcoin-1ecc77321deb61b9f6888e4e10752b9d972fd26e.tar.xz |
scripted-diff: Rename DEFAULT_MEMPOOL_EXPIRY to indicate time unit
Better to be explicit when it comes to time to avoid unintentional bugs.
-BEGIN VERIFY SCRIPT-
find_regex="DEFAULT_MEMPOOL_EXPIRY" \
&& git grep -l -E "$find_regex" \
| xargs sed -i -E "s@$find_regex@\0_HOURS@g"
-END VERIFY SCRIPT-
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/mempool_options.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/kernel/mempool_options.h b/src/kernel/mempool_options.h index 35621e1a28..c4f34ff9f9 100644 --- a/src/kernel/mempool_options.h +++ b/src/kernel/mempool_options.h @@ -12,7 +12,7 @@ class CBlockPolicyEstimator; /** Default for -maxmempool, maximum megabytes of mempool memory usage */ static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB{300}; /** Default for -mempoolexpiry, expiration time for mempool transactions in hours */ -static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY{336}; +static constexpr unsigned int DEFAULT_MEMPOOL_EXPIRY_HOURS{336}; namespace kernel { /** @@ -28,7 +28,7 @@ struct MemPoolOptions { /* The ratio used to determine how often sanity checks will run. */ int check_ratio{0}; int64_t max_size_bytes{DEFAULT_MAX_MEMPOOL_SIZE_MB * 1'000'000}; - std::chrono::seconds expiry{std::chrono::hours{DEFAULT_MEMPOOL_EXPIRY}}; + std::chrono::seconds expiry{std::chrono::hours{DEFAULT_MEMPOOL_EXPIRY_HOURS}}; }; } // namespace kernel |