mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2024-12-23 11:57:18 +00:00
d17996f8b0
* Update V3 from V4 * Fix build v3 -> v4 * Update ssz * Update beacon_chain.pb.go * Fix formatter import * Update update-mockgen.sh comment to v4 * Fix conflicts. Pass build and tests * Fix test
18 lines
557 B
Go
18 lines
557 B
Go
package blocks_test
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/prysmaticlabs/prysm/v4/beacon-chain/core/blocks"
|
|
"github.com/prysmaticlabs/prysm/v4/encoding/bytesutil"
|
|
"github.com/prysmaticlabs/prysm/v4/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")
|
|
}
|