aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2022-07-12 15:54:11 -0400
committerCarl Dong <contact@carldong.me>2022-07-15 11:30:50 -0400
commit413f4bb52b72e082ad8716664ede48352b8e7e5a (patch)
tree0693604f576339340584525094aebfc7efbb41b2 /src/test
parentbd4407817e523e3c5b347bc6be25ed007cb27034 (diff)
DumpMempool: Pass in dump_path, stop using gArgs
Also introduce node::{ShouldPersistMempool,MempoolPath} helper functions in node/mempool_persist_args.{h,cpp} which are used by non-kernel DumpMempool callers to determine whether or not to automatically dump the mempool and where to dump it to.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/fuzz/validation_load_mempool.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/fuzz/validation_load_mempool.cpp b/src/test/fuzz/validation_load_mempool.cpp
index 9532610f8d..d6afc0e4e3 100644
--- a/src/test/fuzz/validation_load_mempool.cpp
+++ b/src/test/fuzz/validation_load_mempool.cpp
@@ -4,6 +4,7 @@
#include <chainparamsbase.h>
#include <mempool_args.h>
+#include <node/mempool_persist_args.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
@@ -15,6 +16,8 @@
#include <cstdint>
#include <vector>
+using node::MempoolPath;
+
namespace {
const TestingSetup* g_setup;
} // namespace
@@ -37,5 +40,5 @@ FUZZ_TARGET_INIT(validation_load_mempool, initialize_validation_load_mempool)
return fuzzed_file_provider.open();
};
(void)LoadMempool(pool, g_setup->m_node.chainman->ActiveChainstate(), fuzzed_fopen);
- (void)DumpMempool(pool, fuzzed_fopen, true);
+ (void)DumpMempool(pool, MempoolPath(g_setup->m_args), fuzzed_fopen, true);
}