aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2022-06-24 12:30:14 -0400
committerCarl Dong <contact@carldong.me>2022-06-27 14:06:47 -0400
commit0199bd35bb44e32ee0db9b51c9d1bd7518c26f19 (patch)
tree7b92162c380cf7259b055bc6af0fff80fe454ad0 /src
parentccbaf546a68d6cda8ed3efd0598c0e4121b366bb (diff)
fuzz/rbf: Add missing TestingSetup
MarcoFalke mentioned that this is likely a bug since "any log messages should be muted, not accumulated and turned into an OOM when fuzzing for a long time".
Diffstat (limited to 'src')
-rw-r--r--src/test/fuzz/rbf.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/test/fuzz/rbf.cpp b/src/test/fuzz/rbf.cpp
index 8dcaa609b5..d4ec6ecfb1 100644
--- a/src/test/fuzz/rbf.cpp
+++ b/src/test/fuzz/rbf.cpp
@@ -8,6 +8,7 @@
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
#include <test/fuzz/util.h>
+#include <test/util/setup_common.h>
#include <txmempool.h>
#include <cstdint>
@@ -15,7 +16,17 @@
#include <string>
#include <vector>
-FUZZ_TARGET(rbf)
+namespace {
+const BasicTestingSetup* g_setup;
+} // namespace
+
+void initialize_rbf()
+{
+ static const auto testing_setup = MakeNoLogFileContext<>();
+ g_setup = testing_setup.get();
+}
+
+FUZZ_TARGET_INIT(rbf, initialize_rbf)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
SetMockTime(ConsumeTime(fuzzed_data_provider));