aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/script_sigcache.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/fuzz/script_sigcache.cpp')
-rw-r--r--src/test/fuzz/script_sigcache.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/test/fuzz/script_sigcache.cpp b/src/test/fuzz/script_sigcache.cpp
index 87af71897b..f7e45d6889 100644
--- a/src/test/fuzz/script_sigcache.cpp
+++ b/src/test/fuzz/script_sigcache.cpp
@@ -16,7 +16,7 @@
#include <string>
#include <vector>
-void initialize()
+void initialize_script_sigcache()
{
static const ECCVerifyHandle ecc_verify_handle;
ECC_Start();
@@ -24,12 +24,12 @@ void initialize()
InitSignatureCache();
}
-void test_one_input(const std::vector<uint8_t>& buffer)
+FUZZ_TARGET_INIT(script_sigcache, initialize_script_sigcache)
{
FuzzedDataProvider fuzzed_data_provider(buffer.data(), buffer.size());
const std::optional<CMutableTransaction> mutable_transaction = ConsumeDeserializable<CMutableTransaction>(fuzzed_data_provider);
- const CTransaction tx = mutable_transaction ? CTransaction{*mutable_transaction} : CTransaction{};
+ const CTransaction tx{mutable_transaction ? *mutable_transaction : CMutableTransaction{}};
const unsigned int n_in = fuzzed_data_provider.ConsumeIntegral<unsigned int>();
const CAmount amount = ConsumeMoney(fuzzed_data_provider);
const bool store = fuzzed_data_provider.ConsumeBool();