(contractShards map[common.Address][]uint64)
| 1374 | } |
| 1375 | |
| 1376 | func (s *SyncClient) removePeerFromTask(contractShards map[common.Address][]uint64) { |
| 1377 | for contract, shards := range contractShards { |
| 1378 | for _, shard := range shards { |
| 1379 | for _, t := range s.tasks { |
| 1380 | if t.Contract == contract && shard == t.ShardId { |
| 1381 | t.state.PeerCount-- |
| 1382 | } |
| 1383 | } |
| 1384 | } |
| 1385 | } |
| 1386 | } |