diff --git a/parity/cli/config.full.toml b/parity/cli/config.full.toml index 0cc365231..cffb0737e 100644 --- a/parity/cli/config.full.toml +++ b/parity/cli/config.full.toml @@ -101,7 +101,7 @@ reseal_min_period = 4000 reseal_max_period = 60000 work_queue_size = 20 relay_set = "cheap" -min_gas_price = "" +min_gas_price = 0 usd_per_tx = "0.0025" usd_per_eth = "auto" price_update_period = "hourly" diff --git a/parity/cli/mod.rs b/parity/cli/mod.rs index 02dc18d38..d8184d5d5 100644 --- a/parity/cli/mod.rs +++ b/parity/cli/mod.rs @@ -269,7 +269,7 @@ usage! { or |c: &Config| otry!(c.mining).tx_time_limit.clone().map(Some), flag_relay_set: String = "cheap", or |c: &Config| otry!(c.mining).relay_set.clone(), - flag_min_gas_price: Option = None, + flag_min_gas_price: Option = None, or |c: &Config| otry!(c.mining).min_gas_price.clone().map(Some), flag_usd_per_tx: String = "0.0025", or |c: &Config| otry!(c.mining).usd_per_tx.clone(), @@ -544,7 +544,7 @@ struct Mining { tx_gas_limit: Option, tx_time_limit: Option, relay_set: Option, - min_gas_price: Option, + min_gas_price: Option, usd_per_tx: Option, usd_per_eth: Option, price_update_period: Option, @@ -811,7 +811,7 @@ mod tests { flag_tx_gas_limit: Some("6283184".into()), flag_tx_time_limit: Some(100u64), flag_relay_set: "cheap".into(), - flag_min_gas_price: Some("".into()), + flag_min_gas_price: Some(0u64), flag_usd_per_tx: "0.0025".into(), flag_usd_per_eth: "auto".into(), flag_price_update_period: "hourly".into(), diff --git a/parity/cli/presets/config.dev.toml b/parity/cli/presets/config.dev.toml index 912a9ffac..f38e17348 100644 --- a/parity/cli/presets/config.dev.toml +++ b/parity/cli/presets/config.dev.toml @@ -3,4 +3,4 @@ chain = "dev" [mining] reseal_min_period = 0 -min_gas_price = "0" \ No newline at end of file +min_gas_price = 0 \ No newline at end of file diff --git a/parity/cli/usage.txt b/parity/cli/usage.txt index 60a8229ed..e8cc755bb 100644 --- a/parity/cli/usage.txt +++ b/parity/cli/usage.txt @@ -295,7 +295,7 @@ Sealing/Mining Options: means we relay nothing if not mining); lenient - Same as strict when mining, and cheap when not (default: {flag_relay_set}). - --min-gas-price STRING Minimum amount of Wei per GAS to be paid for a + --min-gas-price WEI Minimum amount of Wei per GAS to be paid for a transaction to be accepted for mining. Overrides --basic-tx-usd. (default: {flag_min_gas_price:?}) diff --git a/parity/configuration.rs b/parity/configuration.rs index 14c927c10..4932b3bfd 100644 --- a/parity/configuration.rs +++ b/parity/configuration.rs @@ -621,8 +621,8 @@ impl Configuration { if let Some(dec) = self.args.flag_gasprice.as_ref() { return Ok(GasPricerConfig::Fixed(to_u256(dec)?)); - } else if let Some(dec) = self.args.flag_min_gas_price.as_ref() { - return Ok(GasPricerConfig::Fixed(to_u256(dec)?)); + } else if let Some(dec) = self.args.flag_min_gas_price { + return Ok(GasPricerConfig::Fixed(U256::from(dec))); } let usd_per_tx = to_price(&self.args.flag_usd_per_tx)?;