config: remove AddressVersion from the configuration

It is never used and is the same constant for both mainnet, testnet and
privnet.
This commit is contained in:
Evgenii Stratonikov 2020-06-17 15:53:20 +03:00
parent b3b1137030
commit 651976b2ca
12 changed files with 0 additions and 15 deletions

View file

@ -10,7 +10,6 @@ import (
"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"
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
"github.com/nspcc-dev/neo-go/pkg/io"
"github.com/nspcc-dev/neo-go/pkg/network"
"github.com/nspcc-dev/neo-go/pkg/network/metrics"
@ -424,9 +423,6 @@ func initBlockChain(cfg config.Config, log *zap.Logger) (*core.Blockchain, error
if err != nil {
return nil, cli.NewExitError(fmt.Errorf("could not initialize blockchain: %s", err), 1)
}
if cfg.ProtocolConfiguration.AddressVersion != 0 {
address.Prefix = cfg.ProtocolConfiguration.AddressVersion
}
return chain, nil
}

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 5195086
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.001
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.000
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.000
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
SecondsPerBlock: 1
LowPriorityThreshold: 0.001
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.000
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.000
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.000
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 1951352142
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.000
MemPoolSize: 50000

View file

@ -1,6 +1,5 @@
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
SecondsPerBlock: 15
LowPriorityThreshold: 0.000
MemPoolSize: 50000

View file

@ -48,7 +48,6 @@ Example of such configuration:
```yaml
ProtocolConfiguration:
Magic: 56753
AddressVersion: 23
StandbyValidators:
- 02b3622bf4017bdfe317c58aed5f4c753f206b7db896046fa7d774bbc4bf7f8dc2
- 02103a7f7dd016558597f7960d27c516a4394fd968b9e65155eb4b013e4040406e

View file

@ -18,7 +18,6 @@ const (
// ProtocolConfiguration represents the protocol config.
type (
ProtocolConfiguration struct {
AddressVersion byte `yaml:"AddressVersion"`
// FeePerExtraByte sets the expected per-byte fee for
// transactions exceeding the MaxFreeTransactionSize.
FeePerExtraByte float64 `yaml:"FeePerExtraByte"`