mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-09 23:12:25 +00:00
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
|
@ -4,13 +4,14 @@ 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/encoding/address"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestGenesisBlockMainNet(t *testing.T) {
|
||||
cfg, err := config.Load("../../config", config.ModeMainNet)
|
||||
cfg, err := config.Load("../../config", netmode.MainNet)
|
||||
require.NoError(t, err)
|
||||
|
||||
block, err := createGenesisBlock(cfg.ProtocolConfiguration)
|
||||
|
@ -30,7 +31,7 @@ func TestGetConsensusAddressMainNet(t *testing.T) {
|
|||
consensusScript = "72c3d9b3bbf776698694cd2c73fa597a10c31294"
|
||||
)
|
||||
|
||||
cfg, err := config.Load("../../config", config.ModeMainNet)
|
||||
cfg, err := config.Load("../../config", netmode.MainNet)
|
||||
require.NoError(t, err)
|
||||
|
||||
validators, err := getValidators(cfg.ProtocolConfiguration)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue