forked from TrueCloudLab/frostfs-node
[#28] Make storage node configurable
To run storage node at dev-env environment it should have configurable parameters. To keep `cfg` structures we can read configuration from env and yml config file with viper and parse values such as script hashes, fees, keys into `cfg` structures. Signed-off-by: Alex Vanin <alexey@nspcc.ru>
This commit is contained in:
parent
001a23eb31
commit
86b9aefcae
8 changed files with 123 additions and 149 deletions
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
containerGRPC "github.com/nspcc-dev/neofs-api-go/v2/container/grpc"
|
||||
"github.com/nspcc-dev/neofs-api-go/v2/session"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
|
@ -12,10 +11,11 @@ import (
|
|||
)
|
||||
|
||||
func initContainerService(c *cfg) {
|
||||
u160, err := util.Uint160DecodeStringLE(c.cfgContainer.scriptHash)
|
||||
fatalOnErr(err)
|
||||
|
||||
staticClient, err := client.NewStatic(c.cfgMorph.client, u160, c.cfgContainer.fee)
|
||||
staticClient, err := client.NewStatic(
|
||||
c.cfgMorph.client,
|
||||
c.cfgContainer.scriptHash,
|
||||
c.cfgContainer.fee,
|
||||
)
|
||||
fatalOnErr(err)
|
||||
|
||||
cnrClient, err := container.New(staticClient)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue