examples/ipfs-kad.rs: Remove outdated reference to without_init (#1280)

This commit is contained in:
Max Inden
2019-10-19 16:21:36 +02:00
committed by Roman Borschel
parent af61f1fd04
commit 19d313c16c

View File

@ -48,10 +48,6 @@ fn main() {
// Create a swarm to manage peers and events. // Create a swarm to manage peers and events.
let mut swarm = { let mut swarm = {
// Create a Kademlia behaviour. // Create a Kademlia behaviour.
// Note that normally the Kademlia process starts by performing lots of request in order
// to insert our local node in the DHT. However here we use `without_init` because this
// example is very ephemeral and we don't want to pollute the DHT. In a real world
// application, you want to use `new` instead.
let mut cfg = KademliaConfig::default(); let mut cfg = KademliaConfig::default();
cfg.set_query_timeout(Duration::from_secs(5 * 60)); cfg.set_query_timeout(Duration::from_secs(5 * 60));
let store = MemoryStore::new(local_peer_id.clone()); let store = MemoryStore::new(local_peer_id.clone());