Fix update shard state logic

pull/556/head
Rongjian Lan 6 years ago
parent b96972d6e1
commit 323ac53cc7
  1. 6
      core/resharding.go

@ -158,11 +158,13 @@ func (ss *ShardingState) UpdateShardingState(stakeInfo *map[common.Address]*stru
addr.SetBytes(addrBytes)
oldAddresses[addr] = true
_, ok := (*stakeInfo)[addr]
if !ok {
// Remove the node if it's no longer staked
if ok {
newNodeList = append(newNodeList, nodeID)
} else {
// Remove the node if it's no longer staked
}
}
shard.NodeList = newNodeList
}
newAddresses := []types.NodeID{}

Loading…
Cancel
Save