1- // Copyright 2018-2019 Kodebox, Inc.
1+ // Copyright 2018-2020 Kodebox, Inc.
22// This file is part of CodeChain.
33//
44// This program is free software: you can redistribute it and/or modify
@@ -38,6 +38,8 @@ pub struct Genesis {
3838 pub transactions_root : Option < H256 > ,
3939 /// State root.
4040 pub state_root : Option < H256 > ,
41+ /// Next validator set hash.
42+ pub next_validator_set_hash : Option < H256 > ,
4143 /// Extra data.
4244 pub extra_data : Option < Bytes > ,
4345}
@@ -73,7 +75,8 @@ mod tests {
7375 "timestamp": "0x07",
7476 "parentHash": "0x9000000000000000000000000000000000000000000000000000000000000000",
7577 "extraData": "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa",
76- "stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"
78+ "stateRoot": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544",
79+ "nextValidatorSetHash": "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544"
7780 }"# ;
7881 let deserialized: Genesis = serde_json:: from_str ( s) . unwrap ( ) ;
7982 assert_eq ! ( deserialized, Genesis {
@@ -90,6 +93,7 @@ mod tests {
9093 parent_hash: Some ( H256 ( Core256 :: from( "0x9000000000000000000000000000000000000000000000000000000000000000" ) ) ) ,
9194 transactions_root: None ,
9295 state_root: Some ( H256 ( Core256 :: from( "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544" ) ) ) ,
96+ next_validator_set_hash: Some ( H256 ( Core256 :: from( "0xd7f8974fb5ac78d9ac099b9ad5018bedc2ce0a72dad1827a1709da30580f0544" ) ) ) ,
9397 extra_data: Some ( Bytes :: from_str( "0x11bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa" ) . unwrap( ) ) ,
9498 } ) ;
9599 }
0 commit comments