rename to engine_signer
This commit is contained in:
@@ -61,7 +61,7 @@ pass = "test_pass"
|
||||
|
||||
[mining]
|
||||
author = "0xdeadbeefcafe0000000000000000000000000001"
|
||||
consensus_signer = "0xdeadbeefcafe0000000000000000000000000001"
|
||||
engine_signer = "0xdeadbeefcafe0000000000000000000000000001"
|
||||
force_sealing = true
|
||||
reseal_on_txs = "all"
|
||||
reseal_min_period = 4000
|
||||
|
||||
@@ -40,7 +40,7 @@ pass = "password"
|
||||
|
||||
[mining]
|
||||
author = "0xdeadbeefcafe0000000000000000000000000001"
|
||||
consensus_signer = "0xdeadbeefcafe0000000000000000000000000001"
|
||||
engine_signer = "0xdeadbeefcafe0000000000000000000000000001"
|
||||
force_sealing = true
|
||||
reseal_on_txs = "all"
|
||||
reseal_min_period = 4000
|
||||
|
||||
@@ -179,7 +179,7 @@ usage! {
|
||||
flag_author: Option<String> = None,
|
||||
or |c: &Config| otry!(c.mining).author.clone().map(Some),
|
||||
flag_engine_signer: Option<String> = None,
|
||||
or |c: &Config| otry!(c.mining).consensus_signer.clone().map(Some),
|
||||
or |c: &Config| otry!(c.mining).engine_signer.clone().map(Some),
|
||||
flag_force_sealing: bool = false,
|
||||
or |c: &Config| otry!(c.mining).force_sealing.clone(),
|
||||
flag_reseal_on_txs: String = "own",
|
||||
@@ -369,7 +369,7 @@ struct Dapps {
|
||||
#[derive(Default, Debug, PartialEq, RustcDecodable)]
|
||||
struct Mining {
|
||||
author: Option<String>,
|
||||
consensus_signer: Option<String>,
|
||||
engine_signer: Option<String>,
|
||||
force_sealing: Option<bool>,
|
||||
reseal_on_txs: Option<String>,
|
||||
reseal_min_period: Option<u64>,
|
||||
@@ -742,7 +742,7 @@ mod tests {
|
||||
}),
|
||||
mining: Some(Mining {
|
||||
author: Some("0xdeadbeefcafe0000000000000000000000000001".into()),
|
||||
consensus_signer: Some("0xdeadbeefcafe0000000000000000000000000001".into()),
|
||||
engine_signer: Some("0xdeadbeefcafe0000000000000000000000000001".into()),
|
||||
force_sealing: Some(true),
|
||||
reseal_on_txs: Some("all".into()),
|
||||
reseal_min_period: Some(4000),
|
||||
|
||||
@@ -300,7 +300,7 @@ impl Configuration {
|
||||
gas_floor_target: try!(to_u256(&self.args.flag_gas_floor_target)),
|
||||
gas_ceil_target: try!(to_u256(&self.args.flag_gas_cap)),
|
||||
transactions_limit: self.args.flag_tx_queue_size,
|
||||
consensus_signer: try!(self.consensus_signer()),
|
||||
engine_signer: try!(self.engine_signer()),
|
||||
};
|
||||
|
||||
Ok(extras)
|
||||
@@ -310,7 +310,7 @@ impl Configuration {
|
||||
to_address(self.args.flag_etherbase.clone().or(self.args.flag_author.clone()))
|
||||
}
|
||||
|
||||
fn consensus_signer(&self) -> Result<Address, String> {
|
||||
fn engine_signer(&self) -> Result<Address, String> {
|
||||
to_address(self.args.flag_engine_signer.clone())
|
||||
}
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ pub struct MinerExtras {
|
||||
pub gas_floor_target: U256,
|
||||
pub gas_ceil_target: U256,
|
||||
pub transactions_limit: usize,
|
||||
pub consensus_signer: Address,
|
||||
pub engine_signer: Address,
|
||||
}
|
||||
|
||||
impl Default for MinerExtras {
|
||||
@@ -215,7 +215,7 @@ impl Default for MinerExtras {
|
||||
gas_floor_target: U256::from(4_700_000),
|
||||
gas_ceil_target: U256::from(6_283_184),
|
||||
transactions_limit: 1024,
|
||||
consensus_signer: Default::default(),
|
||||
engine_signer: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,9 +220,9 @@ pub fn execute(cmd: RunCmd, logger: Arc<RotatingLogger>) -> Result<(), String> {
|
||||
miner.set_gas_ceil_target(cmd.miner_extras.gas_ceil_target);
|
||||
miner.set_extra_data(cmd.miner_extras.extra_data);
|
||||
miner.set_transactions_limit(cmd.miner_extras.transactions_limit);
|
||||
let consensus_signer = cmd.miner_extras.consensus_signer;
|
||||
if passwords.into_iter().any(|p| miner.set_consensus_signer(consensus_signer, p).is_ok()) {
|
||||
return Err(format!("No password found for the consensus signer {}. Make sure valid password is present in files passed using `--password`.", cmd.miner_extras.consensus_signer));
|
||||
let engine_signer = cmd.miner_extras.engine_signer;
|
||||
if passwords.into_iter().any(|p| miner.set_engine_signer(engine_signer, p).is_ok()) {
|
||||
return Err(format!("No password found for the consensus signer {}. Make sure valid password is present in files passed using `--password`.", cmd.miner_extras.engine_signer));
|
||||
}
|
||||
|
||||
// create client config
|
||||
|
||||
Reference in New Issue
Block a user