From 20c27d054291c9a137e80182ed4289495c626589 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Thu, 8 Oct 2020 16:16:00 +0300 Subject: [PATCH] [#84] Add API version to neofs-node config Signed-off-by: Alex Vanin --- cmd/neofs-node/config.go | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/cmd/neofs-node/config.go b/cmd/neofs-node/config.go index adfc25a08..da8317306 100644 --- a/cmd/neofs-node/config.go +++ b/cmd/neofs-node/config.go @@ -8,6 +8,7 @@ import ( "sync" "github.com/nspcc-dev/neo-go/pkg/util" + "github.com/nspcc-dev/neofs-api-go/pkg" "github.com/nspcc-dev/neofs-api-go/v2/netmap" crypto "github.com/nspcc-dev/neofs-crypto" "github.com/nspcc-dev/neofs-node/misc" @@ -90,6 +91,8 @@ type cfg struct { key *ecdsa.PrivateKey + apiVersion *pkg.Version + cfgGRPC cfgGRPC cfgMorph cfgMorph @@ -201,11 +204,12 @@ func initCfg(path string) *cfg { maxAddrAmount := maxChunkSize / addressSize // each address is about 72 bytes c := &cfg{ - ctx: context.Background(), - viper: viperCfg, - log: log, - wg: new(sync.WaitGroup), - key: key, + ctx: context.Background(), + viper: viperCfg, + log: log, + wg: new(sync.WaitGroup), + key: key, + apiVersion: pkg.SDKVersion(), cfgAccounting: cfgAccounting{ scriptHash: u160Accounting, fee: util.Fixed8(viperCfg.GetInt(cfgAccountingFee)),