Add test for state_root
to genesis
This commit is contained in:
parent
5f953f76d8
commit
5fdad686fa
@ -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]
|
||||||
|
Loading…
Reference in New Issue
Block a user