mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-25 12:57:18 +00:00
273871940c
* Moved a few packagesXXX to test_XXX * Gaz
22 lines
441 B
Go
22 lines
441 B
Go
package blocks_test
|
|
|
|
import (
|
|
"bytes"
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
|
|
)
|
|
|
|
func TestGenesisBlock_InitializedCorrectly(t *testing.T) {
|
|
stateHash := []byte{0}
|
|
b1 := blocks.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")
|
|
}
|
|
}
|