frostfs-node/pkg/morph/client/netmap/new_epoch.go
Pavel Karpy 923f84722a Move to frostfs-node
Signed-off-by: Pavel Karpy <p.karpy@yadro.com>
2022-12-28 15:04:29 +03:00

20 lines
432 B
Go

package netmap
import (
"fmt"
"github.com/TrueCloudLab/frostfs-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
}