forked from TrueCloudLab/frostfs-node
[#496] Use single contract wrapper constructor
There is no need in a separate `New()` or `WrapClient()` Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
b52751e992
commit
2b2b2c2c45
11 changed files with 12 additions and 121 deletions
|
@ -9,7 +9,6 @@ import (
|
|||
"github.com/nspcc-dev/neo-go/pkg/core/block"
|
||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap/wrapper"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/event"
|
||||
netmapEvent "github.com/nspcc-dev/neofs-node/pkg/morph/event/netmap"
|
||||
|
@ -74,17 +73,7 @@ func initMorphComponents(c *cfg) {
|
|||
c.cfgMorph.client = cli
|
||||
}, true)
|
||||
|
||||
staticClient, err := client.NewStatic(
|
||||
c.cfgMorph.client,
|
||||
c.cfgNetmap.scriptHash,
|
||||
0,
|
||||
)
|
||||
fatalOnErr(err)
|
||||
|
||||
cli, err := netmap.New(staticClient)
|
||||
fatalOnErr(err)
|
||||
|
||||
wrap, err := wrapper.New(cli)
|
||||
wrap, err := wrapper.NewFromMorph(c.cfgMorph.client, c.cfgNetmap.scriptHash, 0)
|
||||
fatalOnErr(err)
|
||||
|
||||
c.cfgObject.netMapStorage = newCachedNetmapStorage(c.cfgNetmap.state, wrap)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue