mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-31 16:24:48 +02:00
node: Add reference to mempool in NodeContext
Currently it is an alias to the global ::mempool and should be used as follows. * Node code (validation and transaction relay) can use either ::mempool or node.mempool, whichever seems a better fit. * RPC code should use the added convenience getter EnsureMempool, which makes sure the mempool exists before use. This prepares the RPC code to a future where the mempool might be disabled at runtime or compile time. * Test code should use m_node.mempool directly, as the mempool is always initialized for tests.
This commit is contained in:
@@ -32,7 +32,6 @@ void RPCNestedTests::rpcNestedTests()
|
||||
// do some test setup
|
||||
// could be moved to a more generic place when we add more tests on QT level
|
||||
tableRPC.appendCommand("rpcNestedTest", &vRPCCommands[0]);
|
||||
//mempool.setSanityCheck(1.0);
|
||||
|
||||
TestingSetup test;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user