mempool: Introduce (still-unused) MemPoolLimits

They live as a CTxMemPool member.

[META] These limits will be used in subsequent commits to replace calls
       to gArgs.
This commit is contained in:
Carl Dong
2022-03-17 22:09:05 -04:00
parent 716bb5fbd3
commit 9333427014
7 changed files with 61 additions and 1 deletions

View File

@@ -4,6 +4,8 @@
#ifndef BITCOIN_KERNEL_MEMPOOL_OPTIONS_H
#define BITCOIN_KERNEL_MEMPOOL_OPTIONS_H
#include <kernel/mempool_limits.h>
#include <chrono>
#include <cstdint>
@@ -29,6 +31,7 @@ struct MemPoolOptions {
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_HOURS}};
MemPoolLimits limits{};
};
} // namespace kernel