Replace dev chain special case with preset

Add --min-gas-price (does the same as legacy --gasprice) and tweak
gas_pricer_config() and test cases.  Dev preset will still be
overridden by CLI arguments, including --gasprice.
This commit is contained in:
Joseph Mark
2017-07-13 19:25:41 +07:00
parent 451ef7f09b
commit e0b15116a5
6 changed files with 27 additions and 16 deletions

View File

@@ -0,0 +1,6 @@
[parity]
chain = "dev"
[mining]
reseal_min_period = 0
min_gas_price = "0"

View File

@@ -16,8 +16,7 @@
pub fn preset_config_string(arg: &str) -> Result<&'static str, &str> {
match arg.to_lowercase().as_ref() {
"poa" => Ok(include_str!("./config.poa.toml")),
"pow" => Ok(include_str!("./config.pow.toml")),
"dev" => Ok(include_str!("./config.dev.toml")),
_ => Err(arg.clone())
}
}