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) addr.SetBytes(addrBytes)
oldAddresses[addr] = true oldAddresses[addr] = true
_, ok := (*stakeInfo)[addr] _, ok := (*stakeInfo)[addr]
if !ok { if ok {
// Remove the node if it's no longer staked
newNodeList = append(newNodeList, nodeID) newNodeList = append(newNodeList, nodeID)
} else {
// Remove the node if it's no longer staked
} }
} }
shard.NodeList = newNodeList
} }
newAddresses := []types.NodeID{} newAddresses := []types.NodeID{}

Loading…
Cancel
Save