Fixed node address detection on incoming connection (#6094)

This commit is contained in:
Arkadiy Paronyan
2017-07-19 15:44:21 +02:00
committed by GitHub
parent 2f066535cb
commit 2d7aecf5d9
2 changed files with 15 additions and 5 deletions

View File

@@ -236,6 +236,11 @@ impl NodeTable {
self.nodes.get_mut(id)
}
/// Check if a node exists in the table.
pub fn contains(&self, id: &NodeId) -> bool {
self.nodes.contains_key(id)
}
/// Apply table changes coming from discovery
pub fn update(&mut self, mut update: TableUpdates, reserved: &HashSet<NodeId>) {
for (_, node) in update.added.drain() {