-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(network): Avoid initiating outbound handshakes with IPs for which…
… Zebra already has an active peer. (#7029) * Adds most_recent_by_ip field to address book * adds test * Apply suggestions from code review * fixes lint * Updates most_recent_by_ip in .take() Updates should_update_most_recent_by_ip() and has_active_peer_with_ip to check last_attempt and last_failure times Renames has_active_peer_with_ip * Documents that Zebra will not initiate more than 1 outbound connections per IP * Fixes is_ready_for_connection_attempt_with_ip Adds test coverage for AttemptPending and Failed Fixes new_outbound_peer_connections_are_rate_limited proptest * Applies suggestions from code review. * Applies suggestions from code review * Always return true from `is_ready_for_connection_attempt_with_ip` if max_connections_per_ip != 0 * Update max_connections_per_ip config docs * Warn about invalid config fields and use default values * Ignores last_attempt and last_failure in is_ready_for_connection_attempt_with_ip updates test * Only update most_recent_by_ip if update.last_conn_state is responded. * Apply suggestions from code review Co-authored-by: teor <teor@riseup.net> * fixes lint * Update zebra-network/src/address_book.rs Co-authored-by: teor <teor@riseup.net> * Apply suggestions from code review Co-authored-by: teor <teor@riseup.net> * Fix Rust syntax * Fix whitespace --------- Co-authored-by: teor <teor@riseup.net>
- Loading branch information
Showing
15 changed files
with
313 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.