diff --git a/pkg/core/blockchain.go b/pkg/core/blockchain.go index 694d99b33..bd2a7d318 100644 --- a/pkg/core/blockchain.go +++ b/pkg/core/blockchain.go @@ -324,7 +324,7 @@ func (bc *Blockchain) init() error { bc.dao.PutVersion(ver) bc.dao.Version = ver bc.persistent.Version = ver - genesisBlock, err := createGenesisBlock(bc.config) + genesisBlock, err := CreateGenesisBlock(bc.config) if err != nil { return err } @@ -386,7 +386,7 @@ func (bc *Blockchain) init() error { if len(bc.headerHashes) > 0 { targetHash = bc.headerHashes[len(bc.headerHashes)-1] } else { - genesisBlock, err := createGenesisBlock(bc.config) + genesisBlock, err := CreateGenesisBlock(bc.config) if err != nil { return err } diff --git a/pkg/core/interop_system_core_test.go b/pkg/core/interop_system_core_test.go index d2a08cf76..d9a4b98b6 100644 --- a/pkg/core/interop_system_core_test.go +++ b/pkg/core/interop_system_core_test.go @@ -84,7 +84,7 @@ func getSharpTestGenesis(t *testing.T) *block.Block { cfg, err := config.Load(configPath, netmode.MainNet) require.NoError(t, err) - b, err := createGenesisBlock(cfg.ProtocolConfiguration) + b, err := CreateGenesisBlock(cfg.ProtocolConfiguration) require.NoError(t, err) return b } diff --git a/pkg/core/util.go b/pkg/core/util.go index 308a75151..8ba894c52 100644 --- a/pkg/core/util.go +++ b/pkg/core/util.go @@ -13,8 +13,8 @@ import ( "github.com/nspcc-dev/neo-go/pkg/vm/opcode" ) -// createGenesisBlock creates a genesis block based on the given configuration. -func createGenesisBlock(cfg config.ProtocolConfiguration) (*block.Block, error) { +// CreateGenesisBlock creates a genesis block based on the given configuration. +func CreateGenesisBlock(cfg config.ProtocolConfiguration) (*block.Block, error) { validators, err := validatorsFromConfig(cfg) if err != nil { return nil, err diff --git a/pkg/core/util_test.go b/pkg/core/util_test.go index 0d6215604..7925db1a8 100644 --- a/pkg/core/util_test.go +++ b/pkg/core/util_test.go @@ -14,7 +14,7 @@ func TestGenesisBlockMainNet(t *testing.T) { cfg, err := config.Load("../../config", netmode.MainNet) require.NoError(t, err) - block, err := createGenesisBlock(cfg.ProtocolConfiguration) + block, err := CreateGenesisBlock(cfg.ProtocolConfiguration) require.NoError(t, err) expect := "1f4d1defa46faa5e7b9b8d3f79a06bec777d7c26c4aa5f6f5899a291daa87c15"