diff --git a/src/bin/client/rpc/types/block.rs b/src/bin/client/rpc/types/block.rs index ffb0f8042..138140f60 100644 --- a/src/bin/client/rpc/types/block.rs +++ b/src/bin/client/rpc/types/block.rs @@ -1,7 +1,7 @@ use util::hash::*; use util::uint::*; -#[derive(Serialize)] +#[derive(Default, Serialize)] pub struct Block { hash: H256, #[serde(rename="parentHash")] @@ -30,3 +30,12 @@ pub struct Block { timestamp: u64 } +#[test] +fn test_block_serialize() { + use serde_json; + + let block = Block::default(); + let serialized = serde_json::to_string(&block).unwrap(); + println!("s: {:?}", serialized); + assert!(false); +}