Skip to content

Commit b1318dc

Browse files
committed
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.
1 parent 5615e16 commit b1318dc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/test/fuzz/policy_estimator.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,14 @@ FUZZ_TARGET(policy_estimator, .init = initialize_policy_estimator)
4545
}
4646
const CTransaction tx{*mtx};
4747
const CTxMemPoolEntry& entry = ConsumeTxMemPoolEntry(fuzzed_data_provider, tx);
48+
const auto tx_submitted_in_package = fuzzed_data_provider.ConsumeBool();
49+
const auto tx_has_mempool_parents = fuzzed_data_provider.ConsumeBool();
4850
const auto tx_info = NewMempoolTransactionInfo(entry.GetSharedTx(), entry.GetFee(),
4951
entry.GetTxSize(), entry.GetHeight(),
5052
/*mempool_limit_bypassed=*/false,
51-
/*submitted_in_package=*/false,
53+
tx_submitted_in_package,
5254
/*chainstate_is_current=*/true,
53-
/*has_no_mempool_parents=*/fuzzed_data_provider.ConsumeBool());
55+
tx_has_mempool_parents);
5456
block_policy_estimator.processTransaction(tx_info);
5557
if (fuzzed_data_provider.ConsumeBool()) {
5658
(void)block_policy_estimator.removeTx(tx.GetHash());

0 commit comments

Comments
 (0)