mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
[[refactor]] Check CTxMemPool options in constructor
This ensures that the tests run the same checks on the mempool options that the init code also applies.
This commit is contained in:
@@ -14,8 +14,10 @@
|
||||
#include <test/util/txmempool.h>
|
||||
#include <txmempool.h>
|
||||
#include <uint256.h>
|
||||
#include <util/check.h>
|
||||
#include <util/strencodings.h>
|
||||
#include <util/time.h>
|
||||
#include <util/translation.h>
|
||||
#include <validation.h>
|
||||
#include <versionbits.h>
|
||||
|
||||
@@ -46,7 +48,9 @@ struct MinerTestingSetup : public TestingSetup {
|
||||
// pointer is not accessed, when the new one should be accessed
|
||||
// instead.
|
||||
m_node.mempool.reset();
|
||||
m_node.mempool = std::make_unique<CTxMemPool>(MemPoolOptionsForTest(m_node));
|
||||
bilingual_str error;
|
||||
m_node.mempool = std::make_unique<CTxMemPool>(MemPoolOptionsForTest(m_node), error);
|
||||
Assert(error.empty());
|
||||
return *m_node.mempool;
|
||||
}
|
||||
BlockAssembler AssemblerForTest(CTxMemPool& tx_mempool);
|
||||
|
||||
Reference in New Issue
Block a user