keep author as validator
This commit is contained in:
parent
64d7bcbd0c
commit
cb2c9938a1
@ -25,22 +25,22 @@ use super::timeout::DefaultTimeouts;
|
|||||||
pub struct TendermintParams {
|
pub struct TendermintParams {
|
||||||
/// Gas limit divisor.
|
/// Gas limit divisor.
|
||||||
pub gas_limit_bound_divisor: U256,
|
pub gas_limit_bound_divisor: U256,
|
||||||
/// List of validators.
|
/// List of authorities.
|
||||||
pub validators: Vec<Address>,
|
pub authorities: Vec<Address>,
|
||||||
/// Number of validators.
|
/// Number of authorities.
|
||||||
pub validator_n: usize,
|
pub authority_n: usize,
|
||||||
/// Timeout durations for different steps.
|
/// Timeout durations for different steps.
|
||||||
pub timeouts: DefaultTimeouts,
|
pub timeouts: DefaultTimeouts,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for TendermintParams {
|
impl Default for TendermintParams {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
let validators = vec!["0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e".into(), "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1".into()];
|
let authorities = vec!["0x7d577a597b2742b498cb5cf0c26cdcd726d39e6e".into(), "0x82a978b3f5962a5b0957d9ee9eef472ee55b42f1".into()];
|
||||||
let val_n = validators.len();
|
let val_n = authorities.len();
|
||||||
TendermintParams {
|
TendermintParams {
|
||||||
gas_limit_bound_divisor: 0x0400.into(),
|
gas_limit_bound_divisor: 0x0400.into(),
|
||||||
validators: validators,
|
authorities: authorities,
|
||||||
validator_n: val_n,
|
authority_n: val_n,
|
||||||
timeouts: DefaultTimeouts::default()
|
timeouts: DefaultTimeouts::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -48,12 +48,12 @@ impl Default for TendermintParams {
|
|||||||
|
|
||||||
impl From<ethjson::spec::TendermintParams> for TendermintParams {
|
impl From<ethjson::spec::TendermintParams> for TendermintParams {
|
||||||
fn from(p: ethjson::spec::TendermintParams) -> Self {
|
fn from(p: ethjson::spec::TendermintParams) -> Self {
|
||||||
let val: Vec<_> = p.validators.into_iter().map(Into::into).collect();
|
let val: Vec<_> = p.authorities.into_iter().map(Into::into).collect();
|
||||||
let val_n = val.len();
|
let val_n = val.len();
|
||||||
TendermintParams {
|
TendermintParams {
|
||||||
gas_limit_bound_divisor: p.gas_limit_bound_divisor.into(),
|
gas_limit_bound_divisor: p.gas_limit_bound_divisor.into(),
|
||||||
validators: val,
|
authorities: val,
|
||||||
validator_n: val_n,
|
authority_n: val_n,
|
||||||
timeouts: DefaultTimeouts::default()
|
timeouts: DefaultTimeouts::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user