[#1680] morph/netmap: Adopt to recent contract changes
After recent Netmap contract changes all read methods which return network map (either candidates or snapshots) encode node descriptors into same structure. Decode `netmap.Node` contract-side structure from the call results. Replace node state with the value from the `netmap.Node.State` field. Signed-off-by: Leonard Lyubich <ctulhurider@gmail.com>
This commit is contained in:
parent
d6c01199c8
commit
eb1fba5182
14 changed files with 135 additions and 221 deletions
|
@ -45,7 +45,7 @@ func removeNodesCmd(cmd *cobra.Command, args []string) error {
|
|||
bw := io.NewBufBinWriter()
|
||||
for i := range nodeKeys {
|
||||
emit.AppCall(bw.BinWriter, nmHash, "updateStateIR", callflag.All,
|
||||
int64(netmapcontract.OfflineState), nodeKeys[i].Bytes())
|
||||
int64(netmapcontract.NodeStateOffline), nodeKeys[i].Bytes())
|
||||
}
|
||||
|
||||
if err := emitNewEpochCall(bw, wCtx, nmHash); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue