[#971] morph/client: Adapt signature changes in wrappers

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2021-11-09 23:52:29 +03:00 committed by Alex Vanin
parent 3849d13e0b
commit 1db6d316c2
28 changed files with 301 additions and 193 deletions

View file

@ -2,6 +2,8 @@ package netmap
import (
"fmt"
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
)
// NewEpochArgs groups the arguments
@ -18,7 +20,12 @@ func (a *NewEpochArgs) SetEpochNumber(v int64) {
// NewEpoch invokes the call of new epoch method
// of NeoFS Netmap contract.
func (c *Client) NewEpoch(args NewEpochArgs) error {
if err := c.client.Invoke(c.newEpochMethod, args.number); err != nil {
prm := client.InvokePrm{}
prm.SetMethod(c.newEpochMethod)
prm.SetArgs(args.number)
if err := c.client.Invoke(prm); err != nil {
return fmt.Errorf("could not invoke method (%s): %w", c.newEpochMethod, err)
}
return nil