net: delay stale evaluation and expose time_added in private broadcast

This commit is contained in:
Mccalabrese
2026-03-23 08:55:49 -04:00
parent 999d18ab1c
commit 325afe664d
5 changed files with 50 additions and 12 deletions

View File

@@ -1863,7 +1863,8 @@ std::vector<CTransactionRef> PeerManagerImpl::AbortPrivateBroadcast(const uint25
std::vector<CTransactionRef> removed_txs;
size_t connections_cancelled{0};
for (const auto& [tx, _] : snapshot) {
for (const auto& tx_info : snapshot) {
const CTransactionRef& tx{tx_info.tx};
if (tx->GetHash().ToUint256() != id && tx->GetWitnessHash().ToUint256() != id) continue;
if (const auto peer_acks{m_tx_for_private_broadcast.Remove(tx)}) {
removed_txs.push_back(tx);