The core protocol of WoopChain
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.
 
 
 
woop/core/epochchain_test.go

23 lines
599 B

package core_test
import (
"testing"
"github.com/woop-chain/woop/core"
"github.com/woop-chain/woop/core/rawdb"
"github.com/woop-chain/woop/core/vm"
nodeconfig "github.com/woop-chain/woop/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)
}