[cleanup] remove p2p_inv from AddTxAnnouncement

This param is no longer needed since orphan parent requests are added to
the TxRequestTracker directly.
This commit is contained in:
glozow
2024-12-06 07:02:14 -05:00
parent 063c1324c1
commit f7658d9b14
6 changed files with 12 additions and 14 deletions

View File

@@ -227,7 +227,7 @@ FUZZ_TARGET(txdownloadman, .init = initialize)
GenTxid gtxid = fuzzed_data_provider.ConsumeBool() ?
GenTxid::Txid(rand_tx->GetHash()) :
GenTxid::Wtxid(rand_tx->GetWitnessHash());
txdownloadman.AddTxAnnouncement(rand_peer, gtxid, time, /*p2p_inv=*/fuzzed_data_provider.ConsumeBool());
txdownloadman.AddTxAnnouncement(rand_peer, gtxid, time);
},
[&] {
txdownloadman.GetRequestsToSend(rand_peer, time);
@@ -370,7 +370,7 @@ FUZZ_TARGET(txdownloadman_impl, .init = initialize)
GenTxid gtxid = fuzzed_data_provider.ConsumeBool() ?
GenTxid::Txid(rand_tx->GetHash()) :
GenTxid::Wtxid(rand_tx->GetWitnessHash());
txdownload_impl.AddTxAnnouncement(rand_peer, gtxid, time, /*p2p_inv=*/fuzzed_data_provider.ConsumeBool());
txdownload_impl.AddTxAnnouncement(rand_peer, gtxid, time);
},
[&] {
const auto getdata_requests = txdownload_impl.GetRequestsToSend(rand_peer, time);

View File

@@ -146,8 +146,8 @@ BOOST_FIXTURE_TEST_CASE(tx_rejection_types, TestChain100Setup)
/*txid_recon=*/txdownload_impl.RecentRejectsReconsiderableFilter().contains(parent_txid),
/*wtxid_recon=*/txdownload_impl.RecentRejectsReconsiderableFilter().contains(parent_wtxid),
/*keep=*/keep,
/*txid_inv=*/txdownload_impl.AddTxAnnouncement(nodeid, GenTxid::Txid(parent_txid), now, /*p2p_inv=*/true),
/*wtxid_inv=*/txdownload_impl.AddTxAnnouncement(nodeid, GenTxid::Wtxid(parent_wtxid), now, /*p2p_inv=*/true),
/*txid_inv=*/txdownload_impl.AddTxAnnouncement(nodeid, GenTxid::Txid(parent_txid), now),
/*wtxid_inv=*/txdownload_impl.AddTxAnnouncement(nodeid, GenTxid::Wtxid(parent_wtxid), now),
};
BOOST_TEST_MESSAGE("Testing behavior for " << result << (segwit_parent ? " segwit " : " nonsegwit"));
actual_behavior.CheckEqual(expected_behavior, /*segwit=*/segwit_parent);