19#include <validation.h>
36 g_setup = testing_setup.get();
49 auto& chainstate{
static_cast<DummyChainState&
>(g_setup->m_node.chainman->ActiveChainstate())};
50 chainstate.SetMempool(&pool);
52 auto fuzzed_fopen = [&](
const fs::path&,
const char*) {
53 return fuzzed_file_provider.open();
55 (void)LoadMempool(pool, MempoolPath(g_setup->m_args), chainstate,
57 .mockable_fopen_function = fuzzed_fopen,
59 pool.SetLoadTried(
true);
60 (void)DumpMempool(pool, MempoolPath(g_setup->m_args), fuzzed_fopen,
true);
#define Assert(val)
Identity function.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
Path class wrapper to block calls to the fs::path(std::string) implicit constructor and the fs::path:...
fs::path MempoolPath(const ArgsManager &argsman)
bool DumpMempool(const CTxMemPool &pool, const fs::path &dump_path, FopenFn mockable_fopen_function, bool skip_file_commit)
Dump the mempool to a file.
bool LoadMempool(CTxMemPool &pool, const fs::path &load_path, Chainstate &active_chainstate, ImportMempoolOptions &&opts)
Import the file and attempt to add its contents to the mempool.
std::unique_ptr< T > MakeNoLogFileContext(const ChainType chain_type=ChainType::REGTEST, TestOpts opts={})
Make a test setup that has disk access to the debug.log file disabled.
Testing setup that configures a complete environment.
int64_t ConsumeTime(FuzzedDataProvider &fuzzed_data_provider, const std::optional< int64_t > &min, const std::optional< int64_t > &max) noexcept
CTxMemPool::Options MemPoolOptionsForTest(const NodeContext &node)
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
void initialize_validation_load_mempool()