mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 06:58:57 +01:00
[refactor] Make signals optional in mempool and chainman
This is done in preparation for the next two commits, where the CMainSignals are de-globalized. This avoids adding new constructor arguments to the ChainstateManager and CTxMemPool classes over the next two commits. This could also allow future tests that are only interested in the internal behaviour of the classes to forgo instantiating the signals.
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
|
||||
class CMainSignals;
|
||||
|
||||
/** Default for -maxmempool, maximum megabytes of mempool memory usage */
|
||||
static constexpr unsigned int DEFAULT_MAX_MEMPOOL_SIZE_MB{300};
|
||||
/** Default for -maxmempool when blocksonly is set */
|
||||
@@ -56,6 +58,8 @@ struct MemPoolOptions {
|
||||
bool full_rbf{DEFAULT_MEMPOOL_FULL_RBF};
|
||||
bool persist_v1_dat{DEFAULT_PERSIST_V1_DAT};
|
||||
MemPoolLimits limits{};
|
||||
|
||||
CMainSignals* signals{nullptr};
|
||||
};
|
||||
} // namespace kernel
|
||||
|
||||
|
||||
Reference in New Issue
Block a user