Skip to content

Commit fa57c44

Browse files
author
MacroFake
committed
fuzz: Remove no-op SetMempoolConstraints
1 parent 6dc3084 commit fa57c44

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/test/fuzz/tx_pool.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,6 @@ FUZZ_TARGET_INIT(tx_pool_standard, initialize_tx_pool)
136136
auto& chainstate{static_cast<DummyChainState&>(node.chainman->ActiveChainstate())};
137137

138138
MockTime(fuzzed_data_provider, chainstate);
139-
SetMempoolConstraints(*node.args, fuzzed_data_provider);
140139

141140
// All RBF-spendable outpoints
142141
std::set<COutPoint> outpoints_rbf;
@@ -150,6 +149,7 @@ FUZZ_TARGET_INIT(tx_pool_standard, initialize_tx_pool)
150149
// The sum of the values of all spendable outpoints
151150
constexpr CAmount SUPPLY_TOTAL{COINBASE_MATURITY * 50 * COIN};
152151

152+
SetMempoolConstraints(*node.args, fuzzed_data_provider);
153153
CTxMemPool tx_pool_{MakeMempool(node)};
154154
MockedTxPool& tx_pool = *static_cast<MockedTxPool*>(&tx_pool_);
155155

@@ -220,9 +220,6 @@ FUZZ_TARGET_INIT(tx_pool_standard, initialize_tx_pool)
220220
if (fuzzed_data_provider.ConsumeBool()) {
221221
MockTime(fuzzed_data_provider, chainstate);
222222
}
223-
if (fuzzed_data_provider.ConsumeBool()) {
224-
SetMempoolConstraints(*node.args, fuzzed_data_provider);
225-
}
226223
if (fuzzed_data_provider.ConsumeBool()) {
227224
tx_pool.RollingFeeUpdate();
228225
}
@@ -316,7 +313,6 @@ FUZZ_TARGET_INIT(tx_pool, initialize_tx_pool)
316313
auto& chainstate = node.chainman->ActiveChainstate();
317314

318315
MockTime(fuzzed_data_provider, chainstate);
319-
SetMempoolConstraints(*node.args, fuzzed_data_provider);
320316

321317
std::vector<uint256> txids;
322318
for (const auto& outpoint : g_outpoints_coinbase_init_mature) {
@@ -328,6 +324,7 @@ FUZZ_TARGET_INIT(tx_pool, initialize_tx_pool)
328324
txids.push_back(ConsumeUInt256(fuzzed_data_provider));
329325
}
330326

327+
SetMempoolConstraints(*node.args, fuzzed_data_provider);
331328
CTxMemPool tx_pool_{MakeMempool(node)};
332329
MockedTxPool& tx_pool = *static_cast<MockedTxPool*>(&tx_pool_);
333330

@@ -338,9 +335,6 @@ FUZZ_TARGET_INIT(tx_pool, initialize_tx_pool)
338335
if (fuzzed_data_provider.ConsumeBool()) {
339336
MockTime(fuzzed_data_provider, chainstate);
340337
}
341-
if (fuzzed_data_provider.ConsumeBool()) {
342-
SetMempoolConstraints(*node.args, fuzzed_data_provider);
343-
}
344338
if (fuzzed_data_provider.ConsumeBool()) {
345339
tx_pool.RollingFeeUpdate();
346340
}

0 commit comments

Comments
 (0)