This repository has been archived by the owner on Nov 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6044 from paritytech/issues/4673
`--config` option handles bundled presets
- Loading branch information
Showing
11 changed files
with
225 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[parity] | ||
chain = "dev" | ||
|
||
[mining] | ||
reseal_min_period = 0 | ||
min_gas_price = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[parity] | ||
no_consensus = true | ||
|
||
[rpc] | ||
interface = "all" | ||
apis = ["all"] | ||
hosts = ["all"] | ||
|
||
[ipfs] | ||
enable = false # this is the default | ||
hosts = ["all"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[network] | ||
# Parity will try to maintain connection to at least 50 peers. | ||
min_peers = 50 | ||
# Parity will maintain at most 100 peers. | ||
max_peers = 100 | ||
|
||
[ipc] | ||
# You won't be able to use IPC to interact with Parity. | ||
disable = true | ||
|
||
[dapps] | ||
# You won't be able to access any web Dapps. | ||
disable = true | ||
|
||
[mining] | ||
# Prepare a block to seal even when there are no miners connected. | ||
force_sealing = true | ||
# New pending block will be created for all transactions (both local and external). | ||
reseal_on_txs = "all" | ||
# New pending block will be created only once per 4000 milliseconds. | ||
reseal_min_period = 4000 | ||
# Parity will keep/relay at most 2048 transactions in queue. | ||
tx_queue_size = 2048 | ||
|
||
[footprint] | ||
# If defined will never use more then 256MB for all caches. (Overrides other cache settings). | ||
cache_size = 256 | ||
|
||
[misc] | ||
# Logging pattern (`<module>=<level>`, e.g. `own_tx=trace`). | ||
logging = "miner=trace,own_tx=trace" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
[network] | ||
# Parity will listen for connections on port 30305. | ||
port = 30305 | ||
|
||
[rpc] | ||
# JSON-RPC over HTTP will be accessible on port 8645. | ||
port = 8645 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
// Copyright 2015-2017 Parity Technologies (UK) Ltd. | ||
// This file is part of Parity. | ||
|
||
// Parity is free software: you can redistribute it and/or modify | ||
// it under the terms of the GNU General Public License as published by | ||
// the Free Software Foundation, either version 3 of the License, or | ||
// (at your option) any later version. | ||
|
||
// Parity is distributed in the hope that it will be useful, | ||
// but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
// GNU General Public License for more details. | ||
|
||
// You should have received a copy of the GNU General Public License | ||
// along with Parity. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
use std::io::{Error, ErrorKind}; | ||
|
||
pub fn preset_config_string(arg: &str) -> Result<&'static str, Error> { | ||
match arg.to_lowercase().as_ref() { | ||
"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(Error::new(ErrorKind::InvalidInput, "Config doesn't match any presets [dev, mining, non-standard-ports, insecure, dev-insecure]")) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters