From e1cc73f44e6eaf08b96997c7131f91cd01637676 Mon Sep 17 00:00:00 2001 From: Sebastian Kunert Date: Tue, 18 Oct 2022 17:41:19 +0200 Subject: [PATCH] Use `ArgAction::Set` for enable-offchain-indexing flag (#12521) * Use ArgAction::Set for enable-offchain-indexing * Provide default value for `enable-offchain-indexing` --- client/cli/src/params/offchain_worker_params.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/cli/src/params/offchain_worker_params.rs b/client/cli/src/params/offchain_worker_params.rs index 8cff48fad600c..a660320fde255 100644 --- a/client/cli/src/params/offchain_worker_params.rs +++ b/client/cli/src/params/offchain_worker_params.rs @@ -23,7 +23,7 @@ //! targeted at handling input parameter parsing providing //! a reasonable abstraction. -use clap::Args; +use clap::{ArgAction, Args}; use sc_network::config::Role; use sc_service::config::OffchainWorkerConfig; @@ -48,7 +48,7 @@ pub struct OffchainWorkerParams { /// /// Enables a runtime to write directly to a offchain workers /// DB during block import. - #[arg(long = "enable-offchain-indexing", value_name = "ENABLE_OFFCHAIN_INDEXING")] + #[arg(long = "enable-offchain-indexing", value_name = "ENABLE_OFFCHAIN_INDEXING", default_value_t = false, action = ArgAction::Set)] pub indexing_enabled: bool, }