Skip to content

Commit ff6482f

Browse files
committed
fuzz: add SelectParams to rbf.cpp
We cannot fuzz RBF (or do anything mempool-related, really) without chainparams. This has been true since 2019 at least. I suspect this fuzz test has never really been run.
1 parent a3b7e71 commit ff6482f

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/fuzz/rbf.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,13 @@
1515
#include <string>
1616
#include <vector>
1717

18-
FUZZ_TARGET(rbf)
18+
void initialize_rbf(void) {
19+
// ELEMENTS: our mempool needs Params() to be set for multiple reasons -- to check
20+
// the discount CT rate, to figure out pegin policy, etc
21+
SelectParams(CBaseChainParams::LIQUID1);
22+
}
23+
24+
FUZZ_TARGET_INIT(rbf, initialize_rbf)
1925
{
2026
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
2127
SetMockTime(ConsumeTime(fuzzed_data_provider));

0 commit comments

Comments
 (0)