* Rate-limit new outbound peer connections Set the rate-limiting sleep timer to use a delay added to the maximum between the next peer connection instant and now. This ensures that the timer always sleeps at least the time used for the delay. This change fixes rate-limiting new outbound peer connections, since before there could be a burst of attempts until the deadline progressed to the current instant. Fixes #2216 * Create `MetaAddr::alternate_node_strategy` helper Creates arbitrary `MetaAddr`s as if they were network nodes that sent their listening address. * Test outbound peer connection rate limiting Tests if connections are rate limited to 10 per second, and also tests that sleeping before continuing with the attempts still respets the rate limit and does not result in a burst of reconnection attempts. |
||
---|---|---|
.. | ||
proptest-regressions/protocol | ||
src | ||
Cargo.toml |