frostfs-node/pkg/morph/client/netmap/new_epoch.go

21 lines
440 B
Go
Raw Normal View History

2020-07-24 13:54:03 +00:00
package netmap
import (
"fmt"
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
)
2020-07-24 13:54:03 +00:00
// NewEpoch updates FrostFS 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
2020-07-24 13:54:03 +00:00
}