mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-19 04:11:09 +00:00
Support disabling the addition of the default bootnode (#3888)
This commit is contained in:
@@ -803,7 +803,7 @@ where
|
|||||||
G: RuntimeGenesis,
|
G: RuntimeGenesis,
|
||||||
E: ChainSpecExtension,
|
E: ChainSpecExtension,
|
||||||
{
|
{
|
||||||
if spec.boot_nodes().is_empty() {
|
if spec.boot_nodes().is_empty() && !cli.disable_default_bootnode {
|
||||||
let base_path = base_path(&cli.shared_params, version);
|
let base_path = base_path(&cli.shared_params, version);
|
||||||
let storage_path = network_path(&base_path, spec.id());
|
let storage_path = network_path(&base_path, spec.id());
|
||||||
let node_key = node_key_config(cli.node_key_params, &Some(storage_path))?;
|
let node_key = node_key_config(cli.node_key_params, &Some(storage_path))?;
|
||||||
|
|||||||
@@ -614,6 +614,13 @@ pub struct BuildSpecCmd {
|
|||||||
#[structopt(long = "raw")]
|
#[structopt(long = "raw")]
|
||||||
pub raw: bool,
|
pub raw: bool,
|
||||||
|
|
||||||
|
/// Disable adding the default bootnode to the specification.
|
||||||
|
///
|
||||||
|
/// By default the `/ip4/127.0.0.1/tcp/30333/p2p/NODE_PEER_ID` bootnode is added to the
|
||||||
|
/// specification when no bootnode exists.
|
||||||
|
#[structopt(long = "disable-default-bootnode")]
|
||||||
|
pub disable_default_bootnode: bool,
|
||||||
|
|
||||||
#[allow(missing_docs)]
|
#[allow(missing_docs)]
|
||||||
#[structopt(flatten)]
|
#[structopt(flatten)]
|
||||||
pub shared_params: SharedParams,
|
pub shared_params: SharedParams,
|
||||||
@@ -763,7 +770,7 @@ impl<CC, RP> StructOpt for CoreParams<CC, RP> where
|
|||||||
)
|
)
|
||||||
).subcommand(
|
).subcommand(
|
||||||
BuildSpecCmd::augment_clap(SubCommand::with_name("build-spec"))
|
BuildSpecCmd::augment_clap(SubCommand::with_name("build-spec"))
|
||||||
.about("Build a spec.json file, outputing to stdout.")
|
.about("Build a spec.json file, outputting to stdout.")
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
ExportBlocksCmd::augment_clap(SubCommand::with_name("export-blocks"))
|
ExportBlocksCmd::augment_clap(SubCommand::with_name("export-blocks"))
|
||||||
|
|||||||
Reference in New Issue
Block a user