diff options
author | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2023-12-06 15:05:19 +0100 |
---|---|---|
committer | ismaelsadeeq <ask4ismailsadiq@gmail.com> | 2024-01-02 12:41:01 +0100 |
commit | b1318dcc56a0181783ee7ddbd388ae878a0efc52 (patch) | |
tree | c207f92c3f399bc44397dfd3900845beb4546e47 /src/test | |
parent | 5615e16b705d74bf6ebb7c39523844f97a41cb6f (diff) |
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.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/fuzz/policy_estimator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/fuzz/policy_estimator.cpp b/src/test/fuzz/policy_estimator.cpp index beee3630be..a4e1947b9f 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()); |