Improve nodes state (#917)

* Improve the state consistency in src/nodes

* Add a user data parameter to tasks

* Remove the tasks HashMap in CollectionStream

* Add TODO
This commit is contained in:
Pierre Krieger
2019-02-14 13:46:52 +01:00
committed by GitHub
parent b7fa7f38b1
commit 1100325e63
5 changed files with 131 additions and 252 deletions

View File

@ -107,7 +107,6 @@ fn accepting_a_node_yields_new_entry() {
}
2 => {
assert_matches!(event, Async::Ready(CollectionEvent::NodeReached(reach_ev)) => {
assert_matches!(reach_ev.parent, CollectionStream{..});
let (accept_ev, accepted_peer_id) = reach_ev.accept();
assert_eq!(accepted_peer_id, peer_id);
assert_matches!(accept_ev, CollectionNodeAccept::NewEntry);