mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 22:19:39 +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,7 @@
|
||||
#include <util/time.h>
|
||||
#include <util/translation.h>
|
||||
#include <validation.h>
|
||||
#include <validationinterface.h>
|
||||
|
||||
using node::NodeContext;
|
||||
|
||||
@@ -22,6 +23,7 @@ CTxMemPool::Options MemPoolOptionsForTest(const NodeContext& node)
|
||||
// Default to always checking mempool regardless of
|
||||
// chainparams.DefaultConsistencyChecks for tests
|
||||
.check_ratio = 1,
|
||||
.signals = &GetMainSignals(),
|
||||
};
|
||||
const auto result{ApplyArgsManOptions(*node.args, ::Params(), mempool_opts)};
|
||||
Assert(result);
|
||||
|
||||
Reference in New Issue
Block a user