Added CLI flags
This commit is contained in:
@@ -68,7 +68,7 @@ user = "test_user"
|
||||
pass = "test_pass"
|
||||
|
||||
[ipfs]
|
||||
disable = true
|
||||
enable = false
|
||||
port = 5001
|
||||
|
||||
[mining]
|
||||
|
||||
@@ -39,7 +39,7 @@ user = "username"
|
||||
pass = "password"
|
||||
|
||||
[ipfs]
|
||||
disable = true
|
||||
enable = false
|
||||
port = 5001
|
||||
|
||||
[mining]
|
||||
|
||||
@@ -190,9 +190,9 @@ usage! {
|
||||
flag_dapps_apis_all: bool = false, or |_| None,
|
||||
|
||||
// IPFS
|
||||
flag_ipfs_off: bool = true,
|
||||
or |c: &Config| otry!(c.ipfs).disable.clone(),
|
||||
flag_ipfs_port: u16 = 5001u16,
|
||||
flag_ipfs_api: bool = false,
|
||||
or |c: &Config| otry!(c.ipfs).enable.clone(),
|
||||
flag_ipfs_api_port: u16 = 5001u16,
|
||||
or |c: &Config| otry!(c.ipfs).port.clone(),
|
||||
|
||||
// -- Sealing/Mining Options
|
||||
@@ -418,7 +418,7 @@ struct Dapps {
|
||||
|
||||
#[derive(Default, Debug, PartialEq, RustcDecodable)]
|
||||
struct Ipfs {
|
||||
disable: Option<bool>,
|
||||
enable: Option<bool>,
|
||||
port: Option<u16>,
|
||||
}
|
||||
|
||||
@@ -651,8 +651,8 @@ mod tests {
|
||||
flag_dapps_apis_all: false,
|
||||
|
||||
// IPFS
|
||||
flag_ipfs_off: true,
|
||||
flag_ipfs_port: 5001u16,
|
||||
flag_ipfs_api: false,
|
||||
flag_ipfs_api_port: 5001u16,
|
||||
|
||||
// -- Sealing/Mining Options
|
||||
flag_author: Some("0xdeadbeefcafe0000000000000000000000000001".into()),
|
||||
@@ -840,7 +840,7 @@ mod tests {
|
||||
pass: Some("password".into())
|
||||
}),
|
||||
ipfs: Some(Ipfs {
|
||||
disable: Some(true),
|
||||
enable: Some(false),
|
||||
port: Some(5001)
|
||||
}),
|
||||
mining: Some(Mining {
|
||||
|
||||
@@ -175,9 +175,9 @@ API and Console Options:
|
||||
--dapps-apis-all Expose all possible RPC APIs on Dapps port.
|
||||
WARNING: INSECURE. Used only for development.
|
||||
(default: {flag_dapps_apis_all})
|
||||
--no-ipfs Disable IPFS-compatible HTTP API. (default: {flag_ipfs_off})
|
||||
--ipfs-port PORT Configure on which port the IPFS HTTP API should listen.
|
||||
(default: {flag_ipfs_port})
|
||||
--ipfs-api Enable IPFS-compatible HTTP API. (default: {flag_ipfs_api})
|
||||
--ipfs-api-port PORT Configure on which port the IPFS HTTP API should listen.
|
||||
(default: {flag_ipfs_api_port})
|
||||
|
||||
Sealing/Mining Options:
|
||||
--author ADDRESS Specify the block author (aka "coinbase") address
|
||||
|
||||
Reference in New Issue
Block a user