mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-26 05:17:22 +00:00
a9a4bb9163
* move testutil * util pkg * build * gaz Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
18 lines
548 B
Go
18 lines
548 B
Go
package blocks_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/beacon-chain/core/blocks"
|
|
"github.com/prysmaticlabs/prysm/encoding/bytesutil"
|
|
"github.com/prysmaticlabs/prysm/testing/assert"
|
|
)
|
|
|
|
func TestGenesisBlock_InitializedCorrectly(t *testing.T) {
|
|
stateHash := bytesutil.PadTo([]byte{0}, 32)
|
|
b1 := blocks.NewGenesisBlock(stateHash)
|
|
|
|
assert.NotNil(t, b1.Block.ParentRoot, "Genesis block missing ParentHash field")
|
|
assert.DeepEqual(t, b1.Block.StateRoot, stateHash, "Genesis block StateRootHash32 isn't initialized correctly")
|
|
}
|