Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track # of outbound streams requested, not successfully established
The GossipSub protocol uses two streams, namely one from the local to the remote and one from the remote to the local node. The rust-libp2p implementation enforces an upper limit on the churn of both via `MAX_SUBSTREAM_CREATION`. Thus far `self.outbound_substreams_created` was increased for every successful stream, but ignored failed streams. Thus, on a given connection, a GossipSub handler could potentially indefinitely retry creating an outbound stream, where each of those streams fails instead of succeeds to upgrade. With this commit the handler tracks the number of requested outbound streams instead.
- Loading branch information