mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-27 05:38:55 +00:00
4235980511
* Delete old code * RPC mock testing * Fixed BUILD * Conflict * Lint * More lint
20 lines
369 B
Go
20 lines
369 B
Go
package blocks
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
)
|
|
|
|
func TestGenesisBlock_InitializedCorrectly(t *testing.T) {
|
|
stateHash := []byte{0}
|
|
b1 := NewGenesisBlock(stateHash)
|
|
|
|
if b1.ParentRoot == nil {
|
|
t.Error("genesis block missing ParentHash field")
|
|
}
|
|
|
|
if !bytes.Equal(b1.StateRoot, stateHash) {
|
|
t.Error("genesis block StateRootHash32 isn't initialized correctly")
|
|
}
|
|
}
|