rpc block serialize test

This commit is contained in:
debris 2016-01-26 11:51:35 +01:00
parent b1282fe1f4
commit d27c7f3902
1 changed files with 10 additions and 1 deletions

View File

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