Revert "prevent zero networkID (#9763)" (#9815)

This reverts commit 73f08b376f.
This commit is contained in:
Andronik Ordian 2018-10-26 20:53:19 +02:00 committed by Wei Tang
parent 7036ab26d7
commit 6643b6a306

View File

@ -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")]
@ -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();
}
}