Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix removal of disconnected peers in the peer manager #1182

Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1618bf9
Explicitly end underlying connection
Alex6323 Feb 25, 2022
441a582
Fire 'ProtocolStopped' event in any connection-end case
Alex6323 Feb 25, 2022
ed696a7
Count dial attempts and signal 'PeerUnreachable'
Alex6323 Feb 25, 2022
d1e453b
Temporarly show peer count for gossip-peerlist and protocol-peer_ man…
Alex6323 Feb 25, 2022
f9970d9
Display error message when sending the shutdown signal to an autopeer…
Alex6323 Feb 25, 2022
a53300a
Remove unreachable discovered peers from peer manager
Alex6323 Feb 25, 2022
b6997d2
Remove unreachable discovered peers from gossip and peer manager
Alex6323 Feb 25, 2022
9a14c5c
Publish PeerUnreachable for peers that don't identify properly; Chang…
Alex6323 Feb 27, 2022
d875e8a
Reset dial attempt counter only if peer successfully identified itself
Alex6323 Feb 28, 2022
6d4a3a8
Remove temporary logs
Alex6323 Feb 28, 2022
30d831a
Alias macro starts with the significant part of peer id
Alex6323 Feb 28, 2022
1a06f38
Send PeerRemoved event for disconnected unknown peers
Alex6323 Feb 28, 2022
5d187bc
Alias macro starts with the significant part of peer id (for real)
Alex6323 Feb 28, 2022
e75ae76
Align autopeering peer id display
Alex6323 Feb 28, 2022
49eaf73
Ignore error if adding a local address fails
Alex6323 Feb 28, 2022
bc336d9
Change some log levels
Alex6323 Feb 28, 2022
4d231f7
Format; Introduce display offset constant, Update autopeering changelog
Alex6323 Feb 28, 2022
aa74ff3
Update changelogs; bump versions
Alex6323 Feb 28, 2022
f89f6c2
Nits
Alex6323 Mar 1, 2022
f2c9672
Fix typos and German comma in changelog
Alex6323 Mar 1, 2022
693a826
Fix docs
Alex6323 Mar 1, 2022
74c09b7
Address review comments
Alex6323 Mar 1, 2022
e65444b
Simplify 'add_local_addr' method
Alex6323 Mar 2, 2022
0016bab
Add explanation why sending commands to gossip layer cannot fail
Alex6323 Mar 2, 2022
a0502ac
Rename to 'identified_at'
Alex6323 Mar 2, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove temporary logs
Alex6323 committed Mar 2, 2022
commit 6d4a3a86bf54c46e320280b197509641499525c7
7 changes: 1 addition & 6 deletions bee-protocol/src/workers/peer/manager.rs
Original file line number Diff line number Diff line change
@@ -112,7 +112,6 @@ where

while let Some(event) = receiver.next().await {
trace!("Received event {:?}.", event);
log::warn! {"peer_manager.len()={}", peer_manager.len()};

match event {
NetworkEvent::PeerAdded { peer_id, info } => {
@@ -197,11 +196,7 @@ where
.send(Command::RemovePeer { peer_id })
.expect("send gossip command");

// Todo: tell the autopeering to remove that neighbor.
log::warn!(
"TODO: tell autopeering to remove {} from neighborhood.",
alias!(peer_id)
);
// Todo: tell the autopeering to remove that peer from the neighborhood.
}
}
_ => (), // Ignore all other events for now