Merge branch 'master' into Fix-4858
This commit is contained in:
@@ -100,6 +100,8 @@ pub struct CommonParams {
|
||||
pub block_reward: U256,
|
||||
/// Registrar contract address.
|
||||
pub registrar: Address,
|
||||
/// Node permission managing contract address.
|
||||
pub node_permission_contract: Option<Address>,
|
||||
}
|
||||
|
||||
impl CommonParams {
|
||||
@@ -171,6 +173,7 @@ impl From<ethjson::spec::Params> for CommonParams {
|
||||
gas_limit_bound_divisor: p.gas_limit_bound_divisor.into(),
|
||||
block_reward: p.block_reward.map_or_else(U256::zero, Into::into),
|
||||
registrar: p.registrar.map_or_else(Address::new, Into::into),
|
||||
node_permission_contract: p.node_permission_contract.map(Into::into),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -380,6 +383,9 @@ impl Spec {
|
||||
/// Get the configured Network ID.
|
||||
pub fn network_id(&self) -> u64 { self.params().network_id }
|
||||
|
||||
/// Get the chain ID used for signing.
|
||||
pub fn chain_id(&self) -> u64 { self.params().chain_id }
|
||||
|
||||
/// Get the configured subprotocol name.
|
||||
pub fn subprotocol_name(&self) -> String { self.params().subprotocol_name.clone() }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user