Inside Bitcoin
Opening the selected file…
Inside Bitcoin
Opening the selected file…
The code behind the network, with room to understand it.
Release published 2026-10-28 · Snapshot fetched 2026-11-01. Latest stable release at fetch time; development branches and Git history are excluded. Only the selected code window and visible folders load here.
502// If we ever bypass limits, do not do TRUC invariants checks503bool ever_bypassed_limits{false};505LIMITED_WHILE (fuzzed_data_provider.ConsumeBool(), 300) {506const auto mut_tx = ConsumeTransaction(fuzzed_data_provider, txids);508if (fuzzed_data_provider.ConsumeBool()) {509MockTime(fuzzed_data_provider, chainstate);510}511if (fuzzed_data_provider.ConsumeBool()) {512tx_pool.RollingFeeUpdate();513}514if (fuzzed_data_provider.ConsumeBool()) {515const auto txid = fuzzed_data_provider.ConsumeBool() ?516mut_tx.GetHash() :517PickValue(fuzzed_data_provider, txids);518const auto delta = fuzzed_data_provider.ConsumeIntegralInRange<CAmount>(-50 * COIN, +50 * COIN);519tx_pool.PrioritiseTransaction(txid, delta);520}522const bool bypass_limits{fuzzed_data_provider.ConsumeBool()};523ever_bypassed_limits |= bypass_limits;525const auto tx = MakeTransactionRef(mut_tx);526const auto res = WITH_LOCK(::cs_main, return AcceptToMemoryPool(chainstate, tx, GetTime(), bypass_limits, /*test_accept=*/false));527const bool accepted = res.m_result_type == MempoolAcceptResult::ResultType::VALID;528if (accepted) {529txids.push_back(tx->GetHash());530if (!ever_bypassed_limits) {531CheckMempoolTRUCInvariants(tx_pool);532}533}534}535Finish(fuzzed_data_provider, tx_pool, chainstate);536}537} // namespace
Independent explanations by MyBitcoinExplorer. Not affiliated with or endorsed by Bitcoin Core. Guides are educational and do not replace the source or its tests.
Bitcoin Core source © its contributors, distributed under the MIT license. Original notices and bundled third-party licenses are retained in the source tree.