forked from TrueCloudLab/frostfs-node
Add Inner Ring code
This commit is contained in:
parent
dadfd90dcd
commit
b7b5079934
400 changed files with 11420 additions and 8690 deletions
23
pkg/morph/client/netmap/wrapper/new_epoch.go
Normal file
23
pkg/morph/client/netmap/wrapper/new_epoch.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package wrapper
|
||||
|
||||
import (
|
||||
"github.com/nspcc-dev/neofs-node/pkg/core/netmap/epoch"
|
||||
contract "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// NewEpoch updates NeoFS epoch number through
|
||||
// Netmap contract call.
|
||||
func (w *Wrapper) NewEpoch(e epoch.Epoch) error {
|
||||
// prepare invocation arguments
|
||||
args := contract.NewEpochArgs{}
|
||||
args.SetEpochNumber(int64(epoch.ToUint64(e)))
|
||||
|
||||
// invoke smart contract call
|
||||
//
|
||||
// Note: errors.Wrap returns nil on nil error arg.
|
||||
return errors.Wrap(
|
||||
w.client.NewEpoch(args),
|
||||
"could not invoke smart contract",
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue