mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
darkfid2, faucetd: using Url for net settings
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user