aboutsummaryrefslogtreecommitdiff
path: root/examples/basalt.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/basalt.rs')
-rw-r--r--examples/basalt.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/basalt.rs b/examples/basalt.rs
index e1ac2e4..4ea4f71 100644
--- a/examples/basalt.rs
+++ b/examples/basalt.rs
@@ -85,9 +85,7 @@ async fn main() {
info!("KYEV SK {}", hex::encode(&privkey));
info!("KYEV PK {}", hex::encode(&privkey.public_key()));
- let listen_addr = opt.listen_addr.parse().unwrap();
- let public_addr = opt.public_addr.map(|x| x.parse().unwrap());
- let netapp = NetApp::new(listen_addr, public_addr, netid, privkey);
+ let netapp = NetApp::new(netid, privkey);
let mut bootstrap_peers = vec![];
for peer in opt.bootstrap_peers.iter() {
@@ -119,9 +117,11 @@ async fn main() {
},
);
+ let listen_addr = opt.listen_addr.parse().unwrap();
+ let public_addr = opt.public_addr.map(|x| x.parse().unwrap());
tokio::join!(
sampling_loop(netapp.clone(), peering.clone()),
- netapp.listen(),
+ netapp.listen(listen_addr, public_addr),
peering.run(),
);
}