darkfid2, faucetd: using Url for net settings

This commit is contained in:
ghassmo
2022-05-09 14:22:14 +03:00
committed by parazyd
parent d320edeecb
commit 475b31c5fb
3 changed files with 15 additions and 15 deletions

View File

@@ -1,4 +1,4 @@
use std::{net::SocketAddr, str::FromStr};
use std::str::FromStr;
use async_executor::Executor;
use async_std::sync::{Arc, Mutex};
@@ -86,11 +86,11 @@ struct Args {
#[structopt(long)]
/// P2P accept address for the consensus protocol
consensus_p2p_accept: Option<SocketAddr>,
consensus_p2p_accept: Option<Url>,
#[structopt(long)]
/// P2P external address for the consensus protocol
consensus_p2p_external: Option<SocketAddr>,
consensus_p2p_external: Option<Url>,
#[structopt(long, default_value = "8")]
/// Connection slots for the consensus protocol
@@ -98,19 +98,19 @@ struct Args {
#[structopt(long)]
/// Connect to peer for the consensus protocol (repeatable flag)
consensus_p2p_peer: Vec<SocketAddr>,
consensus_p2p_peer: Vec<Url>,
#[structopt(long)]
/// Connect to seed for the consensus protocol (repeatable flag)
consensus_p2p_seed: Vec<SocketAddr>,
consensus_p2p_seed: Vec<Url>,
#[structopt(long)]
/// P2P accept address for the syncing protocol
sync_p2p_accept: Option<SocketAddr>,
sync_p2p_accept: Option<Url>,
#[structopt(long)]
/// P2P external address for the syncing protocol
sync_p2p_external: Option<SocketAddr>,
sync_p2p_external: Option<Url>,
#[structopt(long, default_value = "8")]
/// Connection slots for the syncing protocol
@@ -118,11 +118,11 @@ struct Args {
#[structopt(long)]
/// Connect to peer for the syncing protocol (repeatable flag)
sync_p2p_peer: Vec<SocketAddr>,
sync_p2p_peer: Vec<Url>,
#[structopt(long)]
/// Connect to seed for the syncing protocol (repeatable flag)
sync_p2p_seed: Vec<SocketAddr>,
sync_p2p_seed: Vec<Url>,
#[structopt(long)]
/// Whitelisted cashier address (repeatable flag)

View File

@@ -1,4 +1,4 @@
use std::{collections::HashMap, net::SocketAddr, str::FromStr};
use std::{collections::HashMap, str::FromStr};
use async_executor::Executor;
use async_std::sync::{Arc, Mutex};
@@ -82,11 +82,11 @@ struct Args {
#[structopt(long)]
/// P2P accept address for the syncing protocol
sync_p2p_accept: Option<SocketAddr>,
sync_p2p_accept: Option<Url>,
#[structopt(long)]
/// P2P external address for the syncing protocol
sync_p2p_external: Option<SocketAddr>,
sync_p2p_external: Option<Url>,
#[structopt(long, default_value = "8")]
/// Connection slots for the syncing protocol
@@ -94,11 +94,11 @@ struct Args {
#[structopt(long)]
/// Connect to seed for the syncing protocol (repeatable flag)
sync_p2p_seed: Vec<SocketAddr>,
sync_p2p_seed: Vec<Url>,
#[structopt(long)]
/// Connect to peer for the syncing protocol (repeatable flag)
sync_p2p_peer: Vec<SocketAddr>,
sync_p2p_peer: Vec<Url>,
#[structopt(long)]
/// Whitelisted cashier address (repeatable flag)

View File

@@ -147,7 +147,7 @@ async fn realmain(settings: Args, executor: Arc<Executor<'_>>) -> Result<()> {
//Raft
//
let datastore_raft = datastore_path.join("tau.db");
let mut raft = Raft::<EncryptedTask>::new(net_settings.inbound, datastore_raft)?;
let mut raft = Raft::<EncryptedTask>::new(net_settings.inbound.clone(), datastore_raft)?;
let raft_sender = raft.get_broadcast();
let commits = raft.get_commits();