Roman Borschel 0bdd637b01
Kademlia: Fix status updates in KBuckets. (#1140)
* Fix status updates in KBuckets.

`KBucket::update` does currently not correctly update the `first_connected_pos`
before reinserting the node. This may result in connected nodes being considered
disconnected and thus eligible for replacement by a pending node if the bucket is
full and a new connected node is added.

Tests have been added for checking that `KBucket::update` preserves the status
and ordering of all other nodes in the bucket.

* Small test improvement.

Set an expectation for the new position, instead of taking the assigned position.
2019-05-23 12:18:13 +02:00
..
2019-05-15 16:50:43 +02:00
2019-05-23 11:14:34 +02:00
2019-05-23 11:14:34 +02:00
2019-05-15 16:50:43 +02:00
2019-05-23 11:14:34 +02:00
2019-05-15 16:50:43 +02:00
2019-05-15 16:50:43 +02:00