Simplify the Addresses (#1012)

* Simplify the Addresses

* Remove println
This commit is contained in:
Pierre Krieger
2019-03-20 17:30:00 +01:00
committed by GitHub
parent 7be97b4f93
commit 7b2980133d
3 changed files with 48 additions and 226 deletions

View File

@ -418,6 +418,11 @@ where
table.first_connected_pos += 1;
// And return a EntryInKbucketDisc.
debug_assert!(table.nodes.iter()
.position(move |e| e.id == *peer_id)
.map(|p| p < table.first_connected_pos)
.unwrap_or(false));
SetDisconnectedOutcome::Kept(EntryInKbucketDisc {
parent: self.parent,
peer_id: self.peer_id,