Skip to content

Commit

Permalink
Filter sanitized addresses Zebra based on address state
Browse files Browse the repository at this point in the history
This fix correctly prevents Zebra gossiping client addresses to peers,
but still keeps the client in the address book to avoid reconnections.
  • Loading branch information
teor2345 committed Jun 16, 2021
1 parent 5fe6efe commit af18c98
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions zebra-network/src/meta_addr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,7 @@ impl MetaAddr {
///
/// Returns `None` if this `MetaAddr` should not be sent to remote peers.
pub fn sanitize(&self) -> Option<MetaAddr> {
// Make sure this address is valid for outbound connections
if !self.is_valid_for_outbound() {
if !self.last_known_info_is_valid_for_outbound() {
return None;
}

Expand Down

0 comments on commit af18c98

Please sign in to comment.