Add insecure presets and tests

This commit is contained in:
Joseph Mark
2017-07-17 13:03:57 +07:00
parent b975efa2bb
commit 360f1fa34f
6 changed files with 73 additions and 6 deletions

View File

@@ -0,0 +1,16 @@
[parity]
no_consensus = true
chain = "dev"
[mining]
reseal_min_period = 0
min_gas_price = 0
[rpc]
interface = "all"
apis = ["all"]
hosts = ["all"]
[ipfs]
enable = false # this is the default
hosts = ["all"]

View File

@@ -0,0 +1,11 @@
[parity]
no_consensus = true
[rpc]
interface = "all"
apis = ["all"]
hosts = ["all"]
[ipfs]
enable = false # this is the default
hosts = ["all"]

View File

@@ -1,6 +1,3 @@
# This config should be placed in following path:
# $HOME/Library/Application Support/io.parity.ethereum/config.toml
[network]
# Parity will try to maintain connection to at least 50 peers.
min_peers = 50

View File

@@ -1,6 +1,3 @@
# This config should be placed in following path:
# $HOME/Library/Application Support/io.parity.ethereum/config.toml
[network]
# Parity will listen for connections on port 30305.
port = 30305

View File

@@ -19,6 +19,8 @@ pub fn preset_config_string(arg: &str) -> Result<&'static str, &str> {
"dev" => Ok(include_str!("./config.dev.toml")),
"mining" => Ok(include_str!("./config.mining.toml")),
"non-standard-ports" => Ok(include_str!("./config.non-standard-ports.toml")),
"insecure" => Ok(include_str!("./config.insecure.toml")),
"dev-insecure" => Ok(include_str!("./config.dev-insecure.toml")),
_ => Err(arg.clone())
}
}