forked from TrueCloudLab/frostfs-node
[#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:
parent
3849d13e0b
commit
1db6d316c2
28 changed files with 301 additions and 193 deletions
|
@ -2,6 +2,8 @@ package netmap
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
)
|
||||
|
||||
// UpdateStateArgs groups the arguments
|
||||
|
@ -26,11 +28,12 @@ func (u *UpdateStateArgs) SetState(v int64) {
|
|||
// UpdateState invokes the call of update state method
|
||||
// of NeoFS Netmap contract.
|
||||
func (c *Client) UpdateState(args UpdateStateArgs) error {
|
||||
err := c.client.Invoke(
|
||||
c.updateStateMethod,
|
||||
args.state,
|
||||
args.key,
|
||||
)
|
||||
prm := client.InvokePrm{}
|
||||
|
||||
prm.SetMethod(c.updateStateMethod)
|
||||
prm.SetArgs(args.state, args.key)
|
||||
|
||||
err := c.client.Invoke(prm)
|
||||
|
||||
if err != nil {
|
||||
return fmt.Errorf("could not invoke method (%s): %w", c.updateStateMethod, err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue