diff options
author | Carl Dong <contact@carldong.me> | 2022-07-12 15:54:11 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-07-15 11:30:50 -0400 |
commit | 413f4bb52b72e082ad8716664ede48352b8e7e5a (patch) | |
tree | 0693604f576339340584525094aebfc7efbb41b2 /src/test/fuzz | |
parent | bd4407817e523e3c5b347bc6be25ed007cb27034 (diff) | |
download | bitcoin-413f4bb52b72e082ad8716664ede48352b8e7e5a.tar.xz |
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/fuzz')
-rw-r--r-- | src/test/fuzz/validation_load_mempool.cpp | 5 |
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); } |