Skip to content

Commit

Permalink
Use ArgAction::Set for enable-offchain-indexing flag (paritytech#12521
Browse files Browse the repository at this point in the history
)

* Use ArgAction::Set for enable-offchain-indexing

* Provide default value for `enable-offchain-indexing`
  • Loading branch information
skunert authored and ark0f committed Feb 27, 2023
1 parent 06b10b1 commit e1cc73f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/cli/src/params/offchain_worker_params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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,
}

Expand Down

0 comments on commit e1cc73f

Please sign in to comment.