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

Commit 6643b6a

Browse files
ordiansorpaas
authored andcommitted
Revert "prevent zero networkID (#9763)" (#9815)
This reverts commit 73f08b3.
1 parent 7036ab2 commit 6643b6a

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

json/src/spec/params.rs

-17
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ pub struct Params {
3535

3636
/// Network id.
3737
#[serde(rename="networkID")]
38-
#[serde(deserialize_with="uint::validate_non_zero")]
3938
pub network_id: Uint,
4039
/// Chain id.
4140
#[serde(rename="chainID")]
@@ -209,20 +208,4 @@ mod tests {
209208

210209
let _deserialized: Params = serde_json::from_str(s).unwrap();
211210
}
212-
213-
#[test]
214-
#[should_panic(expected = "a non-zero value")]
215-
fn test_non_zero_network_id() {
216-
let s = r#"{
217-
"maximumExtraDataSize": "0x20",
218-
"networkID" : "0x0",
219-
"subprotocolName" : "exp",
220-
"minGasLimit": "0x1388",
221-
"accountStartNonce": "0x01",
222-
"gasLimitBoundDivisor": "0x20",
223-
"maxCodeSize": "0x1000"
224-
}"#;
225-
226-
let _deserialized: Params = serde_json::from_str(s).unwrap();
227-
}
228211
}

0 commit comments

Comments
 (0)