[[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:
TheCharlatan
2024-04-21 10:03:21 +02:00
parent 3d24189664
commit 09ef322acc
11 changed files with 83 additions and 30 deletions

View File

@@ -10,6 +10,8 @@
#include <test/util/setup_common.h>
#include <test/util/txmempool.h>
#include <txmempool.h>
#include <util/check.h>
#include <util/translation.h>
#include <cstddef>
#include <cstdint>
@@ -52,7 +54,9 @@ FUZZ_TARGET(partially_downloaded_block, .init = initialize_pdb)
CBlockHeaderAndShortTxIDs cmpctblock{*block};
CTxMemPool pool{MemPoolOptionsForTest(g_setup->m_node)};
bilingual_str error;
CTxMemPool pool{MemPoolOptionsForTest(g_setup->m_node), error};
Assert(error.empty());
PartiallyDownloadedBlock pdb{&pool};
// Set of available transactions (mempool or extra_txn)