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
No known key found for this signature in database
GPG Key ID: D362883A9218FCC6

View File

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