frostfs-node/pkg/morph/client/netmap/new_epoch.go
Evgenii Stratonikov 1e8391d216 [#1141] morph/client: Allow to use more integer types as arguments
Also, use `*big.Int` as integer value, see nspcc-dev/neo-go#2413.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2022-05-16 15:09:35 +03:00

20 lines
427 B
Go

package netmap
import (
"fmt"
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
)
// NewEpoch updates NeoFS epoch number through
// Netmap contract call.
func (c *Client) NewEpoch(epoch uint64) error {
prm := client.InvokePrm{}
prm.SetMethod(newEpochMethod)
prm.SetArgs(epoch)
if err := c.client.Invoke(prm); err != nil {
return fmt.Errorf("could not invoke method (%s): %w", newEpochMethod, err)
}
return nil
}