From 0b4eef48c5c4dd2ea4b0b7adcb1047bf102bcf78 Mon Sep 17 00:00:00 2001 From: Guanqun Lu Date: Sun, 14 May 2017 00:31:57 +0800 Subject: [PATCH] add asserts in instantseal --- json/src/spec/instant_seal.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/json/src/spec/instant_seal.rs b/json/src/spec/instant_seal.rs index 168b51c68..ebf167d28 100644 --- a/json/src/spec/instant_seal.rs +++ b/json/src/spec/instant_seal.rs @@ -35,6 +35,8 @@ pub struct InstantSeal { #[cfg(test)] mod tests { use serde_json; + use hash::Address; + use util::hash::H160; use spec::instant_seal::InstantSeal; #[test] @@ -45,6 +47,7 @@ mod tests { } }"#; - let _deserialized: InstantSeal = serde_json::from_str(s).unwrap(); + let deserialized: InstantSeal = serde_json::from_str(s).unwrap(); + assert_eq!(deserialized.params.registrar, Some(Address(H160::from("0xc6d9d2cd449a754c494264e1809c50e34d64562b")))); } }