Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
companion for 14754: cli: move no-beefy flag to sc-cli (#2996)
Browse files Browse the repository at this point in the history
* companion 14754: no-beefy flag moved to sc-cli

Signed-off-by: Adrian Catangiu <[email protected]>

* bump substrate ref

Signed-off-by: Adrian Catangiu <[email protected]>

* bump polkadot ref

---------

Signed-off-by: Adrian Catangiu <[email protected]>
  • Loading branch information
acatangiu authored Aug 11, 2023
1 parent 5a90e29 commit 9afe6a0
Show file tree
Hide file tree
Showing 7 changed files with 285 additions and 267 deletions.
528 changes: 264 additions & 264 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions client/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,10 @@ impl sc_cli::CliConfiguration for NormalizedRunCmd {
self.base.disable_grandpa()
}

fn disable_beefy(&self) -> sc_cli::Result<bool> {
self.base.disable_beefy()
}

fn rpc_max_connections(&self) -> sc_cli::Result<u32> {
self.base.rpc_max_connections()
}
Expand Down
7 changes: 4 additions & 3 deletions client/relay-chain-inprocess-interface/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ pub fn check_block_in_chain(
/// Build the Polkadot full node using the given `config`.
#[sc_tracing::logging::prefix_logs_with("Relaychain")]
fn build_polkadot_full_node(
config: Configuration,
mut config: Configuration,
parachain_config: &Configuration,
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
hwbench: Option<sc_sysinfo::HwBench>,
Expand All @@ -277,13 +277,14 @@ fn build_polkadot_full_node(
(polkadot_service::IsCollator::No, None)
};

// Disable BEEFY. It should not be required by the internal relay chain node.
config.disable_beefy = true;

let relay_chain_full_node = polkadot_service::build_full(
config,
polkadot_service::NewFullParams {
is_collator,
grandpa_pause: None,
// Disable BEEFY. It should not be required by the internal relay chain node.
enable_beefy: false,
jaeger_agent: None,
telemetry_worker_handle,

Expand Down
4 changes: 4 additions & 0 deletions parachain-template/node/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,10 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.disable_grandpa()
}

fn disable_beefy(&self) -> Result<bool> {
self.base.base.disable_beefy()
}

fn max_runtime_instances(&self) -> Result<Option<usize>> {
self.base.base.max_runtime_instances()
}
Expand Down
4 changes: 4 additions & 0 deletions polkadot-parachain/src/command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,10 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.disable_grandpa()
}

fn disable_beefy(&self) -> Result<bool> {
self.base.base.disable_beefy()
}

fn max_runtime_instances(&self) -> Result<Option<usize>> {
self.base.base.max_runtime_instances()
}
Expand Down
4 changes: 4 additions & 0 deletions test/service/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ impl CliConfiguration<Self> for RelayChainCli {
self.base.base.disable_grandpa()
}

fn disable_beefy(&self) -> CliResult<bool> {
self.base.base.disable_beefy()
}

fn max_runtime_instances(&self) -> CliResult<Option<usize>> {
self.base.base.max_runtime_instances()
}
Expand Down
1 change: 1 addition & 0 deletions test/service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ pub fn node_config(
offchain_worker: OffchainWorkerConfig { enabled: true, indexing_enabled: false },
force_authoring: false,
disable_grandpa: false,
disable_beefy: true,
dev_key_seed: Some(key_seed),
tracing_targets: None,
tracing_receiver: Default::default(),
Expand Down

0 comments on commit 9afe6a0

Please sign in to comment.