mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 17:01:09 +00:00
Add --no-beefy CLI flag (#2981)
* Add --disable-beefy CLI flag * Update cli/src/command.rs Co-authored-by: Andronik Ordian <write@reusable.software> * Update node/test/service/src/lib.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update parachain/test-parachains/adder/collator/src/main.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update cli/src/command.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update cli/src/cli.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> * Update cli/src/cli.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Update cli/src/cli.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: Andronik Ordian <write@reusable.software> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -100,6 +100,10 @@ pub struct RunCmd {
|
||||
#[structopt(long = "grandpa-pause", number_of_values(2))]
|
||||
pub grandpa_pause: Vec<u32>,
|
||||
|
||||
/// Disable BEEFY gadget.
|
||||
#[structopt(long)]
|
||||
pub no_beefy: bool,
|
||||
|
||||
/// Add the destination address to the jaeger agent.
|
||||
///
|
||||
/// Must be valid socket address, of format `IP:Port`
|
||||
|
||||
@@ -189,6 +189,7 @@ pub fn run() -> Result<()> {
|
||||
config,
|
||||
service::IsCollator::No,
|
||||
grandpa_pause,
|
||||
cli.run.no_beefy,
|
||||
jaeger_agent,
|
||||
None,
|
||||
).map(|full| full.task_manager)
|
||||
|
||||
@@ -679,6 +679,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
||||
mut config: Configuration,
|
||||
is_collator: IsCollator,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
disable_beefy: bool,
|
||||
jaeger_agent: Option<std::net::SocketAddr>,
|
||||
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
|
||||
program_path: Option<std::path::PathBuf>,
|
||||
@@ -972,7 +973,7 @@ pub fn new_full<RuntimeApi, Executor>(
|
||||
};
|
||||
|
||||
// We currently only run the BEEFY gadget on the Rococo and Wococo testnets.
|
||||
if chain_spec.is_rococo() || chain_spec.is_wococo() {
|
||||
if !disable_beefy && (chain_spec.is_rococo() || chain_spec.is_wococo()) {
|
||||
let gadget = beefy_gadget::start_beefy_gadget::<_, beefy_primitives::ecdsa::AuthorityPair, _, _, _, _>(
|
||||
client.clone(),
|
||||
keystore_opt.clone(),
|
||||
@@ -1262,6 +1263,7 @@ pub fn build_full(
|
||||
config: Configuration,
|
||||
is_collator: IsCollator,
|
||||
grandpa_pause: Option<(u32, u32)>,
|
||||
disable_beefy: bool,
|
||||
jaeger_agent: Option<std::net::SocketAddr>,
|
||||
telemetry_worker_handle: Option<TelemetryWorkerHandle>,
|
||||
) -> Result<NewFull<Client>, Error> {
|
||||
@@ -1270,6 +1272,7 @@ pub fn build_full(
|
||||
config,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
disable_beefy,
|
||||
jaeger_agent,
|
||||
telemetry_worker_handle,
|
||||
None,
|
||||
@@ -1279,6 +1282,7 @@ pub fn build_full(
|
||||
config,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
disable_beefy,
|
||||
jaeger_agent,
|
||||
telemetry_worker_handle,
|
||||
None,
|
||||
@@ -1288,6 +1292,7 @@ pub fn build_full(
|
||||
config,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
disable_beefy,
|
||||
jaeger_agent,
|
||||
telemetry_worker_handle,
|
||||
None,
|
||||
@@ -1297,6 +1302,7 @@ pub fn build_full(
|
||||
config,
|
||||
is_collator,
|
||||
grandpa_pause,
|
||||
disable_beefy,
|
||||
jaeger_agent,
|
||||
telemetry_worker_handle,
|
||||
None,
|
||||
|
||||
@@ -82,6 +82,7 @@ pub fn new_full(
|
||||
config,
|
||||
is_collator,
|
||||
None,
|
||||
true,
|
||||
None,
|
||||
None,
|
||||
worker_program_path,
|
||||
|
||||
@@ -62,6 +62,7 @@ fn main() -> Result<()> {
|
||||
config,
|
||||
polkadot_service::IsCollator::Yes(collator.collator_key()),
|
||||
None,
|
||||
true,
|
||||
None,
|
||||
None,
|
||||
).map_err(|e| e.to_string())?;
|
||||
|
||||
Reference in New Issue
Block a user