Change --min-gas-price to u64
This commit is contained in:
parent
9c3bd83d3b
commit
0f37261dbf
@ -101,7 +101,7 @@ reseal_min_period = 4000
|
|||||||
reseal_max_period = 60000
|
reseal_max_period = 60000
|
||||||
work_queue_size = 20
|
work_queue_size = 20
|
||||||
relay_set = "cheap"
|
relay_set = "cheap"
|
||||||
min_gas_price = ""
|
min_gas_price = 0
|
||||||
usd_per_tx = "0.0025"
|
usd_per_tx = "0.0025"
|
||||||
usd_per_eth = "auto"
|
usd_per_eth = "auto"
|
||||||
price_update_period = "hourly"
|
price_update_period = "hourly"
|
||||||
|
@ -269,7 +269,7 @@ usage! {
|
|||||||
or |c: &Config| otry!(c.mining).tx_time_limit.clone().map(Some),
|
or |c: &Config| otry!(c.mining).tx_time_limit.clone().map(Some),
|
||||||
flag_relay_set: String = "cheap",
|
flag_relay_set: String = "cheap",
|
||||||
or |c: &Config| otry!(c.mining).relay_set.clone(),
|
or |c: &Config| otry!(c.mining).relay_set.clone(),
|
||||||
flag_min_gas_price: Option<String> = None,
|
flag_min_gas_price: Option<u64> = None,
|
||||||
or |c: &Config| otry!(c.mining).min_gas_price.clone().map(Some),
|
or |c: &Config| otry!(c.mining).min_gas_price.clone().map(Some),
|
||||||
flag_usd_per_tx: String = "0.0025",
|
flag_usd_per_tx: String = "0.0025",
|
||||||
or |c: &Config| otry!(c.mining).usd_per_tx.clone(),
|
or |c: &Config| otry!(c.mining).usd_per_tx.clone(),
|
||||||
@ -544,7 +544,7 @@ struct Mining {
|
|||||||
tx_gas_limit: Option<String>,
|
tx_gas_limit: Option<String>,
|
||||||
tx_time_limit: Option<u64>,
|
tx_time_limit: Option<u64>,
|
||||||
relay_set: Option<String>,
|
relay_set: Option<String>,
|
||||||
min_gas_price: Option<String>,
|
min_gas_price: Option<u64>,
|
||||||
usd_per_tx: Option<String>,
|
usd_per_tx: Option<String>,
|
||||||
usd_per_eth: Option<String>,
|
usd_per_eth: Option<String>,
|
||||||
price_update_period: Option<String>,
|
price_update_period: Option<String>,
|
||||||
@ -811,7 +811,7 @@ mod tests {
|
|||||||
flag_tx_gas_limit: Some("6283184".into()),
|
flag_tx_gas_limit: Some("6283184".into()),
|
||||||
flag_tx_time_limit: Some(100u64),
|
flag_tx_time_limit: Some(100u64),
|
||||||
flag_relay_set: "cheap".into(),
|
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_tx: "0.0025".into(),
|
||||||
flag_usd_per_eth: "auto".into(),
|
flag_usd_per_eth: "auto".into(),
|
||||||
flag_price_update_period: "hourly".into(),
|
flag_price_update_period: "hourly".into(),
|
||||||
|
@ -3,4 +3,4 @@ chain = "dev"
|
|||||||
|
|
||||||
[mining]
|
[mining]
|
||||||
reseal_min_period = 0
|
reseal_min_period = 0
|
||||||
min_gas_price = "0"
|
min_gas_price = 0
|
@ -295,7 +295,7 @@ Sealing/Mining Options:
|
|||||||
means we relay nothing if not mining);
|
means we relay nothing if not mining);
|
||||||
lenient - Same as strict when mining, and cheap
|
lenient - Same as strict when mining, and cheap
|
||||||
when not (default: {flag_relay_set}).
|
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
|
transaction to be accepted for mining. Overrides
|
||||||
--basic-tx-usd.
|
--basic-tx-usd.
|
||||||
(default: {flag_min_gas_price:?})
|
(default: {flag_min_gas_price:?})
|
||||||
|
@ -621,8 +621,8 @@ impl Configuration {
|
|||||||
|
|
||||||
if let Some(dec) = self.args.flag_gasprice.as_ref() {
|
if let Some(dec) = self.args.flag_gasprice.as_ref() {
|
||||||
return Ok(GasPricerConfig::Fixed(to_u256(dec)?));
|
return Ok(GasPricerConfig::Fixed(to_u256(dec)?));
|
||||||
} else if let Some(dec) = self.args.flag_min_gas_price.as_ref() {
|
} else if let Some(dec) = self.args.flag_min_gas_price {
|
||||||
return Ok(GasPricerConfig::Fixed(to_u256(dec)?));
|
return Ok(GasPricerConfig::Fixed(U256::from(dec)));
|
||||||
}
|
}
|
||||||
|
|
||||||
let usd_per_tx = to_price(&self.args.flag_usd_per_tx)?;
|
let usd_per_tx = to_price(&self.args.flag_usd_per_tx)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user