Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Revert "prevent zero networkID (#9763)" (#9815)
Browse files Browse the repository at this point in the history
This reverts commit 73f08b3.
  • Loading branch information
ordian authored and sorpaas committed Oct 26, 2018
1 parent 7036ab2 commit 6643b6a
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions json/src/spec/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ pub struct Params {

/// Network id.
#[serde(rename="networkID")]
#[serde(deserialize_with="uint::validate_non_zero")]
pub network_id: Uint,
/// Chain id.
#[serde(rename="chainID")]
Expand Down Expand Up @@ -209,20 +208,4 @@ mod tests {

let _deserialized: Params = serde_json::from_str(s).unwrap();
}

#[test]
#[should_panic(expected = "a non-zero value")]
fn test_non_zero_network_id() {
let s = r#"{
"maximumExtraDataSize": "0x20",
"networkID" : "0x0",
"subprotocolName" : "exp",
"minGasLimit": "0x1388",
"accountStartNonce": "0x01",
"gasLimitBoundDivisor": "0x20",
"maxCodeSize": "0x1000"
}"#;

let _deserialized: Params = serde_json::from_str(s).unwrap();
}
}

0 comments on commit 6643b6a

Please sign in to comment.