prysm-pulse/beacon-chain/state/genesis/genesis_test.go
terencechain d17996f8b0
Update to V4 🚀 (#12134)
* 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
2023-03-17 18:52:56 +00:00

33 lines
564 B
Go

package genesis_test
import (
"testing"
"github.com/prysmaticlabs/prysm/v4/beacon-chain/state/genesis"
"github.com/prysmaticlabs/prysm/v4/config/params"
)
func TestGenesisState(t *testing.T) {
tests := []struct {
name string
}{
{
name: params.MainnetName,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
st, err := genesis.State(tt.name)
if err != nil {
t.Fatal(err)
}
if st == nil {
t.Fatal("nil state")
}
if st.NumValidators() <= 0 {
t.Error("No validators present in state")
}
})
}
}