Move more params to the common section. (#6134)
* move common forks and parameters to common params * port specs over to new format * fix RPC tests
This commit is contained in:
committed by
Gav Wood
parent
9c5ef1f776
commit
003eef982b
@@ -22,9 +22,6 @@ use super::ValidatorSet;
|
||||
/// Authority params deserialization.
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
pub struct BasicAuthorityParams {
|
||||
/// Gas limit divisor.
|
||||
#[serde(rename="gasLimitBoundDivisor")]
|
||||
pub gas_limit_bound_divisor: Uint,
|
||||
/// Block duration.
|
||||
#[serde(rename="durationLimit")]
|
||||
pub duration_limit: Uint,
|
||||
@@ -43,9 +40,8 @@ pub struct BasicAuthority {
|
||||
mod tests {
|
||||
use serde_json;
|
||||
use uint::Uint;
|
||||
use util::U256;
|
||||
use bigint::prelude::{U256, H160};
|
||||
use hash::Address;
|
||||
use util::hash::H160;
|
||||
use spec::basic_authority::BasicAuthority;
|
||||
use spec::validator_set::ValidatorSet;
|
||||
|
||||
@@ -53,7 +49,6 @@ mod tests {
|
||||
fn basic_authority_deserialization() {
|
||||
let s = r#"{
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"durationLimit": "0x0d",
|
||||
"validators" : {
|
||||
"list": ["0xc6d9d2cd449a754c494264e1809c50e34d64562b"]
|
||||
@@ -63,7 +58,6 @@ mod tests {
|
||||
|
||||
let deserialized: BasicAuthority = serde_json::from_str(s).unwrap();
|
||||
|
||||
assert_eq!(deserialized.params.gas_limit_bound_divisor, Uint(U256::from(0x0400)));
|
||||
assert_eq!(deserialized.params.duration_limit, Uint(U256::from(0x0d)));
|
||||
let vs = ValidatorSet::List(vec![Address(H160::from("0xc6d9d2cd449a754c494264e1809c50e34d64562b"))]);
|
||||
assert_eq!(deserialized.params.validators, vs);
|
||||
|
||||
Reference in New Issue
Block a user