Add test for state_root to genesis

This commit is contained in:
Paul Hauner
2019-01-25 11:25:56 +11:00
parent 5f953f76d8
commit 5fdad686fa

View File

@@ -32,12 +32,13 @@ mod tests {
use bls::Signature; use bls::Signature;
#[test] #[test]
fn test_genesis() { fn test_state_root() {
let spec = ChainSpec::foundation(); let spec = ChainSpec::foundation();
let state_root = Hash256::from("cats".as_bytes()); let state_root = Hash256::from("cats".as_bytes());
// This only checks that the function runs without panic. let block = genesis_beacon_block(state_root, &spec);
genesis_beacon_block(state_root, &spec);
assert_eq!(block.state_root, state_root);
} }
#[test] #[test]