Skip to content

Commit

Permalink
fix: debug related
Browse files Browse the repository at this point in the history
  • Loading branch information
metacertain committed May 26, 2021
1 parent 92bc947 commit 2a6ed76
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions pkg/retrieval/retrieval.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ func (s *Service) RetrieveChunk(ctx context.Context, addr swarm.Address, origin
)

requestAttempt := 0
emptyRounds := 0

lastTime := time.Now().Unix()

Expand Down Expand Up @@ -159,7 +158,6 @@ func (s *Service) RetrieveChunk(ctx context.Context, addr swarm.Address, origin
if res.retrieved {
if res.err != nil {
if !res.peer.IsZero() {
emptyRounds++
logger.Debugf("retrieval: failed to get chunk %s from peer %s: %v", addr, res.peer, res.err)
}
peersResults++
Expand Down Expand Up @@ -200,10 +198,6 @@ func (s *Service) RetrieveChunk(ctx context.Context, addr swarm.Address, origin
}
}

if emptyRounds >= maxSelects {
requestAttempt++
emptyRounds = 0
}
}

// if we have not managed to get results after 5 rounds of peer selections, give up
Expand Down

0 comments on commit 2a6ed76

Please sign in to comment.