Skip to content

Commit 5dc94d1

Browse files
committed
fuzz fix: assert MAX_PEER_TX_ANNOUNCEMENTS is not exceeded
Previously this assertion checked MAX_PEER_TX_REQUEST_IN_FLIGHT was not exceeded. However, this property is not actually enforced; it is just used to determine when a peer is overloaded.
1 parent 8351562 commit 5dc94d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/test/fuzz/txdownloadman.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ static void CheckInvariants(const node::TxDownloadManagerImpl& txdownload_impl,
287287
// We should never have more than the maximum in-flight requests out for a peer.
288288
for (NodeId peer = 0; peer < NUM_PEERS; ++peer) {
289289
if (!HasRelayPermissions(peer)) {
290-
Assert(txdownload_impl.m_txrequest.CountInFlight(peer) <= node::MAX_PEER_TX_REQUEST_IN_FLIGHT);
290+
Assert(txdownload_impl.m_txrequest.Count(peer) <= node::MAX_PEER_TX_ANNOUNCEMENTS);
291291
}
292292
}
293293
txdownload_impl.m_txrequest.SanityCheck();

0 commit comments

Comments
 (0)