mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 23:57:56 +00:00
client: Introduce --sentry-nodes flag (#4285)
* client/authority-discovery: Add smoke tests for intervall_at * client/authority-discovery: Fix interval_at to fire on start * .maintain/sentry-node: Update docker compose file * client: Introduce --sentry-nodes flag Enable operators to specify the public addresses of sentry nodes infront of a validator node so that the validator node can announce the sentry node addresses instead of its own public addresses on the DHT via the authority discovery module. * client/authority-discovery: Break lines at 100 characters Limit line length to 100 instead of 120 characters.
This commit is contained in:
@@ -674,12 +674,14 @@ fn fill_network_configuration(
|
||||
config.boot_nodes.extend(cli.bootnodes.into_iter());
|
||||
config.config_path = Some(config_path.to_string_lossy().into());
|
||||
config.net_config_path = config.config_path.clone();
|
||||
config.reserved_nodes.extend(cli.reserved_nodes.into_iter());
|
||||
|
||||
config.reserved_nodes.extend(cli.reserved_nodes.into_iter());
|
||||
if cli.reserved_only {
|
||||
config.non_reserved_mode = NonReservedPeerMode::Deny;
|
||||
}
|
||||
|
||||
config.sentry_nodes.extend(cli.sentry_nodes.into_iter());
|
||||
|
||||
for addr in cli.listen_addr.iter() {
|
||||
let addr = addr.parse().ok().ok_or(error::Error::InvalidListenMultiaddress)?;
|
||||
config.listen_addresses.push(addr);
|
||||
|
||||
@@ -177,6 +177,14 @@ pub struct NetworkConfigurationParams {
|
||||
#[structopt(long = "reserved-only")]
|
||||
pub reserved_only: bool,
|
||||
|
||||
/// Specify a list of sentry node public addresses.
|
||||
#[structopt(
|
||||
long = "sentry-nodes",
|
||||
value_name = "URL",
|
||||
conflicts_with_all = &[ "sentry" ]
|
||||
)]
|
||||
pub sentry_nodes: Vec<String>,
|
||||
|
||||
/// Listen on this multiaddress.
|
||||
#[structopt(long = "listen-addr", value_name = "LISTEN_ADDR")]
|
||||
pub listen_addr: Vec<String>,
|
||||
|
||||
Reference in New Issue
Block a user