19#include <validation.h>
35 static const auto testing_setup = MakeNoLogFileContext<const TestingSetup>();
36 g_setup = testing_setup.get();
50 auto& chainstate{
static_cast<DummyChainState&
>(g_setup->m_node.chainman->ActiveChainstate())};
53 auto fuzzed_fopen = [&](
const fs::path&,
const char*) {
54 return fuzzed_file_provider.open();
58 .mockable_fopen_function = fuzzed_fopen,
60 pool.SetLoadTried(
true);
#define Assert(val)
Identity function.
CTxMemPool stores valid-according-to-the-current-best-chain transactions that may be included in the ...
void SetMempool(CTxMemPool *mempool)
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 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.
bool DumpMempool(const CTxMemPool &pool, const fs::path &dump_path, FopenFn mockable_fopen_function, bool skip_file_commit)
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
void SeedRandomStateForTest(SeedRand seedtype)
Seed the global RNG state for testing and log the seed value.
@ ZEROS
Seed with a compile time constant of zeros.
CTxMemPool::Options MemPoolOptionsForTest(const NodeContext &node)
void SetMockTime(int64_t nMockTimeIn)
DEPRECATED Use SetMockTime with chrono type.
FUZZ_TARGET(validation_load_mempool,.init=initialize_validation_load_mempool)
void initialize_validation_load_mempool()