diff --git a/pkg/config/config.go b/pkg/config/config.go index 2ab072cc5..a82838ec2 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -129,9 +129,9 @@ func getEmbeddedConfig(configPath string) ([]byte, error) { return config.TestNet, nil case fmt.Sprintf("%s/protocol.%s.yml", DefaultConfigPath, netmode.PrivNet): return config.PrivNet, nil - case fmt.Sprintf("%s/protocol.mainnet.neofs.yml", DefaultConfigPath): + case fmt.Sprintf("%s/protocol.%s.yml", DefaultConfigPath, netmode.MainNetNeoFS): return config.MainNetNeoFS, nil - case fmt.Sprintf("%s/protocol.testnet.neofs.yml", DefaultConfigPath): + case fmt.Sprintf("%s/protocol.%s.yml", DefaultConfigPath, netmode.TestNetNeoFS): return config.TestNetNeoFS, nil default: return nil, fmt.Errorf("config '%s' doesn't exist and no matching embedded config was found", configPath) diff --git a/pkg/config/netmode/netmode.go b/pkg/config/netmode/netmode.go index b0943682c..936cb63f9 100644 --- a/pkg/config/netmode/netmode.go +++ b/pkg/config/netmode/netmode.go @@ -11,6 +11,10 @@ const ( PrivNet Magic = 56753 // docker privnet // UnitTestNet is a stub magic code used for testing purposes. UnitTestNet Magic = 42 + //MainNetNeoFS contains magic code used in the NeoFS main network. + MainNetNeoFS Magic = 0x572dfa5 // NeoFS mainnet + //TestNetNeoFS contains magic code used in the NeoFS test network. + TestNetNeoFS Magic = 0x2bdb2b5f // NeoFS testnet ) // Magic describes the network the blockchain will operate on. @@ -27,6 +31,10 @@ func (n Magic) String() string { return "mainnet" case UnitTestNet: return "unit_testnet" + case MainNetNeoFS: + return "mainnet.neofs" + case TestNetNeoFS: + return "testnet.neofs" default: return "net 0x" + strconv.FormatUint(uint64(n), 16) } diff --git a/pkg/core/blockchain_neotest_test.go b/pkg/core/blockchain_neotest_test.go index 9f0db2603..3a30ef48d 100644 --- a/pkg/core/blockchain_neotest_test.go +++ b/pkg/core/blockchain_neotest_test.go @@ -1197,6 +1197,8 @@ func TestConfig_LoadDefaultConfigs(t *testing.T) { netmode.PrivNet, netmode.TestNet, netmode.UnitTestNet, + netmode.MainNetNeoFS, + netmode.TestNetNeoFS, "privnet.docker.one", "privnet.docker.two", "privnet.docker.three",