You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
616 B
24 lines
616 B
2 years ago
|
package core_test
|
||
|
|
||
|
import (
|
||
|
"testing"
|
||
|
|
||
|
"github.com/ethereum/go-ethereum/core/rawdb"
|
||
|
"github.com/harmony-one/harmony/core"
|
||
|
"github.com/harmony-one/harmony/core/vm"
|
||
|
nodeconfig "github.com/harmony-one/harmony/internal/configs/node"
|
||
|
"github.com/stretchr/testify/require"
|
||
|
)
|
||
|
|
||
|
func TestGenesisBlock(t *testing.T) {
|
||
|
db := rawdb.NewMemoryDatabase()
|
||
|
err := (&core.GenesisInitializer{NetworkType: nodeconfig.Mainnet}).InitChainDB(db, 0)
|
||
|
require.NoError(t, err)
|
||
|
|
||
|
chain, err := core.NewEpochChain(db, nil, nil, vm.Config{})
|
||
|
require.NoError(t, err)
|
||
|
|
||
|
header := chain.GetHeaderByNumber(0)
|
||
|
require.NotEmpty(t, header)
|
||
|
}
|