aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/policy_estimator.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2021-12-08 16:19:31 -0500
committerCarl Dong <contact@carldong.me>2022-06-28 16:08:34 -0400
commitd1684beabe5b738c2cc83de83e1aaef11a761b69 (patch)
tree78a19775e3c20969688f8cfee621efdb4049f736 /src/test/fuzz/policy_estimator.cpp
parent9a3d825c30e8e6118d74a4e568744cb9d03f7f5d (diff)
downloadbitcoin-d1684beabe5b738c2cc83de83e1aaef11a761b69.tar.xz
fees: Pass in a filepath instead of referencing gArgs
Diffstat (limited to 'src/test/fuzz/policy_estimator.cpp')
-rw-r--r--src/test/fuzz/policy_estimator.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/fuzz/policy_estimator.cpp b/src/test/fuzz/policy_estimator.cpp
index e4d95f72a0..58c19a91cb 100644
--- a/src/test/fuzz/policy_estimator.cpp
+++ b/src/test/fuzz/policy_estimator.cpp
@@ -3,6 +3,7 @@
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#include <policy/fees.h>
+#include <policy/fees_args.h>
#include <primitives/transaction.h>
#include <test/fuzz/FuzzedDataProvider.h>
#include <test/fuzz/fuzz.h>
@@ -15,15 +16,20 @@
#include <string>
#include <vector>
+namespace {
+const BasicTestingSetup* g_setup;
+} // namespace
+
void initialize_policy_estimator()
{
static const auto testing_setup = MakeNoLogFileContext<>();
+ g_setup = testing_setup.get();
}
FUZZ_TARGET_INIT(policy_estimator, initialize_policy_estimator)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
- CBlockPolicyEstimator block_policy_estimator;
+ CBlockPolicyEstimator block_policy_estimator{FeeestPath(*g_setup->m_node.args)};
LIMITED_WHILE(fuzzed_data_provider.ConsumeBool(), 10000) {
CallOneOf(
fuzzed_data_provider,