mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Use libp2p 0.6.0 instead of a custom branch (#2150)
This commit is contained in:
committed by
André Silva
parent
63c3dd5a45
commit
d4a4022dd1
@@ -7,7 +7,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
crossbeam-channel = "0.3.4"
|
||||
libp2p = { git = "https://github.com/tomaka/libp2p-rs", branch = "substrate-tmp-2019-03-20", default-features = false }
|
||||
libp2p = { version = "0.6.0", default-features = false }
|
||||
log = "0.4"
|
||||
primitives = { package = "substrate-primitives", path= "../../primitives" }
|
||||
inherents = { package = "substrate-inherents", path = "../../inherents" }
|
||||
|
||||
@@ -13,7 +13,7 @@ bytes = "0.4"
|
||||
error-chain = { version = "0.12", default-features = false }
|
||||
fnv = "1.0"
|
||||
futures = "0.1"
|
||||
libp2p = { git = "https://github.com/tomaka/libp2p-rs", branch = "substrate-tmp-2019-03-20", default-features = false, features = ["secio-secp256k1", "libp2p-websocket"] }
|
||||
libp2p = { version = "0.6.0", default-features = false, features = ["secio-secp256k1", "libp2p-websocket"] }
|
||||
parking_lot = "0.7.1"
|
||||
lazy_static = "1.2"
|
||||
log = "0.4"
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -10,7 +10,7 @@ edition = "2018"
|
||||
[dependencies]
|
||||
fnv = "1.0"
|
||||
futures = "0.1"
|
||||
libp2p = { git = "https://github.com/tomaka/libp2p-rs", branch = "substrate-tmp-2019-03-20", default-features = false }
|
||||
libp2p = { version = "0.6.0", default-features = false }
|
||||
log = "0.4"
|
||||
parking_lot = "0.7"
|
||||
rand = "0.6"
|
||||
|
||||
Reference in New Issue
Block a user