aboutsummaryrefslogtreecommitdiff
path: root/examples/fullmesh.rs
diff options
context:
space:
mode:
Diffstat (limited to 'examples/fullmesh.rs')
-rw-r--r--examples/fullmesh.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/fullmesh.rs b/examples/fullmesh.rs
index 88784c1..eb954b7 100644
--- a/examples/fullmesh.rs
+++ b/examples/fullmesh.rs
@@ -65,9 +65,7 @@ async fn main() {
info!("Node private key: {}", hex::encode(&privkey));
info!("Node public key: {}", 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() {
@@ -81,5 +79,7 @@ async fn main() {
let peering = FullMeshPeeringStrategy::new(netapp.clone(), bootstrap_peers);
- tokio::join!(netapp.listen(), peering.run(),);
+ let listen_addr = opt.listen_addr.parse().unwrap();
+ let public_addr = opt.public_addr.map(|x| x.parse().unwrap());
+ tokio::join!(netapp.listen(listen_addr, public_addr), peering.run(),);
}