config: move NetMode into its own micropackage

It's going to be used a bit more and pulling whole config just for one type is
a bit wrong.
This commit is contained in:
Roman Khimov 2020-06-14 10:34:50 +03:00
parent 6eb600de5a
commit 26f11a52d9
12 changed files with 61 additions and 51 deletions

View file

@ -7,6 +7,7 @@ import (
"testing"
"github.com/nspcc-dev/neo-go/pkg/config"
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
"github.com/nspcc-dev/neo-go/pkg/core"
"github.com/nspcc-dev/neo-go/pkg/core/block"
"github.com/nspcc-dev/neo-go/pkg/core/storage"
@ -19,7 +20,7 @@ import (
)
func getUnitTestChain(t *testing.T) (*core.Blockchain, config.Config, *zap.Logger) {
net := config.ModeUnitTestNet
net := netmode.UnitTestNet
configPath := "../../../config"
cfg, err := config.Load(configPath, net)
require.NoError(t, err, "could not load config")