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:
parent
6eb600de5a
commit
26f11a52d9
12 changed files with 61 additions and 51 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"github.com/nspcc-dev/dbft/block"
|
||||
"github.com/nspcc-dev/dbft/payload"
|
||||
"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/storage"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||
|
@ -217,7 +218,7 @@ func getTestValidator(i int) (*privateKey, *publicKey) {
|
|||
}
|
||||
|
||||
func newTestChain(t *testing.T) *core.Blockchain {
|
||||
unitTestNetCfg, err := config.Load("../../config", config.ModeUnitTestNet)
|
||||
unitTestNetCfg, err := config.Load("../../config", netmode.UnitTestNet)
|
||||
require.NoError(t, err)
|
||||
|
||||
chain, err := core.NewBlockchain(storage.NewMemoryStore(), unitTestNetCfg.ProtocolConfiguration, zaptest.NewLogger(t))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue