[#1889] adm: Add command morph netmap-candidates

Signed-off-by: Anton Nikiforov <an.nikiforov@yadro.com>
This commit is contained in:
Anton Nikiforov 2023-01-31 13:33:33 +03:00 committed by fyrchik
parent ee24815748
commit 515c60bdf4
7 changed files with 53 additions and 4 deletions

View file

@ -22,7 +22,7 @@ func (c *Client) GetNetMapByEpoch(epoch uint64) (*netmap.NetMap, error) {
epochSnapshotMethod, err)
}
nm, err := decodeNetMap(res)
nm, err := DecodeNetMap(res)
if err != nil {
return nil, err
}
@ -61,10 +61,10 @@ func (c *Client) NetMap() (*netmap.NetMap, error) {
netMapMethod, err)
}
return decodeNetMap(res)
return DecodeNetMap(res)
}
func decodeNetMap(resStack []stackitem.Item) (*netmap.NetMap, error) {
func DecodeNetMap(resStack []stackitem.Item) (*netmap.NetMap, error) {
var nm netmap.NetMap
if len(resStack) > 0 {