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

Commit 9afe6a0

Browse files
authored
companion for 14754: cli: move no-beefy flag to sc-cli (#2996)
* 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]>
1 parent 5a90e29 commit 9afe6a0

File tree

7 files changed

+285
-267
lines changed

7 files changed

+285
-267
lines changed

Cargo.lock

Lines changed: 264 additions & 264 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/cli/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ impl sc_cli::CliConfiguration for NormalizedRunCmd {
393393
self.base.disable_grandpa()
394394
}
395395

396+
fn disable_beefy(&self) -> sc_cli::Result<bool> {
397+
self.base.disable_beefy()
398+
}
399+
396400
fn rpc_max_connections(&self) -> sc_cli::Result<u32> {
397401
self.base.rpc_max_connections()
398402
}

client/relay-chain-inprocess-interface/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ pub fn check_block_in_chain(
265265
/// Build the Polkadot full node using the given `config`.
266266
#[sc_tracing::logging::prefix_logs_with("Relaychain")]
267267
fn build_polkadot_full_node(
268-
config: Configuration,
268+
mut config: Configuration,
269269
parachain_config: &Configuration,
270270
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
271271
hwbench: Option<sc_sysinfo::HwBench>,
@@ -277,13 +277,14 @@ fn build_polkadot_full_node(
277277
(polkadot_service::IsCollator::No, None)
278278
};
279279

280+
// Disable BEEFY. It should not be required by the internal relay chain node.
281+
config.disable_beefy = true;
282+
280283
let relay_chain_full_node = polkadot_service::build_full(
281284
config,
282285
polkadot_service::NewFullParams {
283286
is_collator,
284287
grandpa_pause: None,
285-
// Disable BEEFY. It should not be required by the internal relay chain node.
286-
enable_beefy: false,
287288
jaeger_agent: None,
288289
telemetry_worker_handle,
289290

parachain-template/node/src/command.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ impl CliConfiguration<Self> for RelayChainCli {
408408
self.base.base.disable_grandpa()
409409
}
410410

411+
fn disable_beefy(&self) -> Result<bool> {
412+
self.base.base.disable_beefy()
413+
}
414+
411415
fn max_runtime_instances(&self) -> Result<Option<usize>> {
412416
self.base.base.max_runtime_instances()
413417
}

polkadot-parachain/src/command.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,6 +1064,10 @@ impl CliConfiguration<Self> for RelayChainCli {
10641064
self.base.base.disable_grandpa()
10651065
}
10661066

1067+
fn disable_beefy(&self) -> Result<bool> {
1068+
self.base.base.disable_beefy()
1069+
}
1070+
10671071
fn max_runtime_instances(&self) -> Result<Option<usize>> {
10681072
self.base.base.max_runtime_instances()
10691073
}

test/service/src/cli.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ impl CliConfiguration<Self> for RelayChainCli {
220220
self.base.base.disable_grandpa()
221221
}
222222

223+
fn disable_beefy(&self) -> CliResult<bool> {
224+
self.base.base.disable_beefy()
225+
}
226+
223227
fn max_runtime_instances(&self) -> CliResult<Option<usize>> {
224228
self.base.base.max_runtime_instances()
225229
}

test/service/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,7 @@ pub fn node_config(
772772
offchain_worker: OffchainWorkerConfig { enabled: true, indexing_enabled: false },
773773
force_authoring: false,
774774
disable_grandpa: false,
775+
disable_beefy: true,
775776
dev_key_seed: Some(key_seed),
776777
tracing_targets: None,
777778
tracing_receiver: Default::default(),

0 commit comments

Comments
 (0)