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
21
pkg/morph/client/netmap/wrapper/irlist.go
Normal file
21
pkg/morph/client/netmap/wrapper/irlist.go
Normal file
|
@ -0,0 +1,21 @@
|
|||
package wrapper
|
||||
|
||||
import (
|
||||
contract "github.com/nspcc-dev/neofs-node/pkg/morph/client/netmap"
|
||||
"github.com/pkg/errors"
|
||||
)
|
||||
|
||||
// InnerRingKeys receives public key list of inner
|
||||
// ring nodes through Netmap contract call and returns it.
|
||||
func (w *Wrapper) InnerRingKeys() ([][]byte, error) {
|
||||
// prepare invocation arguments
|
||||
args := contract.InnerRingListArgs{}
|
||||
|
||||
// invoke smart contract call
|
||||
values, err := w.client.InnerRingList(args)
|
||||
if err != nil {
|
||||
return nil, errors.Wrap(err, "could not invoke smart contract")
|
||||
}
|
||||
|
||||
return values.KeyList(), nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue