Use libp2p 0.6.0 instead of a custom branch (#2150)

This commit is contained in:
Pierre Krieger
2019-03-30 17:53:20 -03:00
committed by André Silva
parent 63c3dd5a45
commit d4a4022dd1
5 changed files with 125 additions and 125 deletions
@@ -63,11 +63,10 @@ impl<TMessage, TSubstream> Behaviour<TMessage, TSubstream> {
let custom_protocols = CustomProto::new(protocol, peerset);
let mut kademlia = Kademlia::without_init(local_public_key.into_peer_id());
let mut kademlia = Kademlia::new(local_public_key.into_peer_id());
for (peer_id, addr) in &known_addresses {
kademlia.add_connected_address(peer_id, addr.clone());
}
kademlia.initialize();
Behaviour {
ping: Ping::new(),
@@ -76,7 +75,7 @@ impl<TMessage, TSubstream> Behaviour<TMessage, TSubstream> {
user_defined: known_addresses,
kademlia,
next_kad_random_query: Delay::new(Instant::now()),
duration_to_next_kad: Duration::from_secs(10),
duration_to_next_kad: Duration::from_secs(1),
},
identify,
events: Vec::new(),