MCPcopy Create free account
hub / github.com/ethstorage/es-node / removePeerFromTask

Method removePeerFromTask

ethstorage/p2p/protocol/syncclient.go:1376–1386  ·  view source on GitHub ↗
(contractShards map[common.Address][]uint64)

Source from the content-addressed store, hash-verified

1374}
1375
1376func (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}

Callers 1

RemovePeerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected