Skip to content

Commit cc16fff

Browse files
committed
Make txid delay penalty also apply to fetches of orphan's parents
1 parent 173a1d2 commit cc16fff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/net_processing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -767,13 +767,13 @@ void PeerManager::AddTxAnnouncement(const CNode& node, const GenTxid& gtxid, std
767767
// - "preferred": if fPreferredDownload is set (= outbound, or PF_NOBAN permission)
768768
// - "reqtime": current time plus delays for:
769769
// - NONPREF_PEER_TX_DELAY for announcements from non-preferred connections
770-
// - TXID_RELAY_DELAY for announcements from txid peers while wtxid peers are available
770+
// - TXID_RELAY_DELAY for txid announcements while wtxid peers are available
771771
// - OVERLOADED_PEER_TX_DELAY for announcements from peers which have at least
772772
// MAX_PEER_TX_REQUEST_IN_FLIGHT requests in flight (and don't have PF_RELAY).
773773
auto delay = std::chrono::microseconds{0};
774774
const bool preferred = state->fPreferredDownload;
775775
if (!preferred) delay += NONPREF_PEER_TX_DELAY;
776-
if (!state->m_wtxid_relay && g_wtxid_relay_peers > 0) delay += TXID_RELAY_DELAY;
776+
if (!gtxid.IsWtxid() && g_wtxid_relay_peers > 0) delay += TXID_RELAY_DELAY;
777777
const bool overloaded = !node.HasPermission(PF_RELAY) &&
778778
m_txrequest.CountInFlight(nodeid) >= MAX_PEER_TX_REQUEST_IN_FLIGHT;
779779
if (overloaded) delay += OVERLOADED_PEER_TX_DELAY;

0 commit comments

Comments
 (0)