From b1318dcc56a0181783ee7ddbd388ae878a0efc52 Mon Sep 17 00:00:00 2001 From: ismaelsadeeq Date: Wed, 6 Dec 2023 15:05:19 +0100 Subject: [PATCH] test: change `m_submitted_in_package` input to fuzz data provider boolean In reality some mempool transaction might be submitted in a package, so change m_submitted_in_package to fuzz data provider boolean just like m_has_no_mempool_parents. --- src/test/fuzz/policy_estimator.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/test/fuzz/policy_estimator.cpp b/src/test/fuzz/policy_estimator.cpp index beee3630be9..a4e1947b9f6 100644 --- a/src/test/fuzz/policy_estimator.cpp +++ b/src/test/fuzz/policy_estimator.cpp @@ -45,12 +45,14 @@ FUZZ_TARGET(policy_estimator, .init = initialize_policy_estimator) } const CTransaction tx{*mtx}; const CTxMemPoolEntry& entry = ConsumeTxMemPoolEntry(fuzzed_data_provider, tx); + const auto tx_submitted_in_package = fuzzed_data_provider.ConsumeBool(); + const auto tx_has_mempool_parents = fuzzed_data_provider.ConsumeBool(); const auto tx_info = NewMempoolTransactionInfo(entry.GetSharedTx(), entry.GetFee(), entry.GetTxSize(), entry.GetHeight(), /*mempool_limit_bypassed=*/false, - /*submitted_in_package=*/false, + tx_submitted_in_package, /*chainstate_is_current=*/true, - /*has_no_mempool_parents=*/fuzzed_data_provider.ConsumeBool()); + tx_has_mempool_parents); block_policy_estimator.processTransaction(tx_info); if (fuzzed_data_provider.ConsumeBool()) { (void)block_policy_estimator.removeTx(tx.GetHash());