* fix #6228: do not display eth price in cli for etc Current behaviour: When the client is started with defaults, the miner's gas calibrator periodically queries the price of ether in usd and uses it to adjust the wei_per_gas variable, displaying an info message in the cli each time calibration happens. The info message mentions the price of ETH. When started with the --min-gas-price option, the calibrator is inactive and the price is not displayed. Problem: When running on an alternate chain such as ethereum classic, the info message mentioning the ETH price is present, unless the --min-gas-price option is used. Solution: if chain != foundation and --min-gas-price is not set, don't use GasPricerConfig::Calibrated as default but rather fix the minimum gas price to zero. * self.chain() returns ChainType. * match chain based on SpecType
This commit is contained in:
parent
54b14001fa
commit
542cee9ace
@ -651,6 +651,8 @@ impl Configuration {
|
|||||||
return Ok(GasPricerConfig::Fixed(to_u256(dec)?));
|
return Ok(GasPricerConfig::Fixed(to_u256(dec)?));
|
||||||
} else if let Some(dec) = self.args.arg_min_gas_price {
|
} else if let Some(dec) = self.args.arg_min_gas_price {
|
||||||
return Ok(GasPricerConfig::Fixed(U256::from(dec)));
|
return Ok(GasPricerConfig::Fixed(U256::from(dec)));
|
||||||
|
} else if self.chain()? != SpecType::Foundation {
|
||||||
|
return Ok(GasPricerConfig::Fixed(U256::zero()));
|
||||||
}
|
}
|
||||||
|
|
||||||
let usd_per_tx = to_price(&self.args.arg_usd_per_tx)?;
|
let usd_per_tx = to_price(&self.args.arg_usd_per_tx)?;
|
||||||
|
Loading…
Reference in New Issue
Block a user