Skip to content

Commit

Permalink
quick retry timer
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed Jun 22, 2024
1 parent 39e4192 commit 2bc07a4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions blocksync/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,11 +763,13 @@ OUTER_LOOP:

poolHeight := bpr.pool.Height()
fmt.Println("poolHeight", poolHeight)
var retryTimer *time.Timer
if bpr.height-poolHeight < minBlocksForSingleRequest {
bpr.pickSecondPeerAndSendRequest()
retryTimer = time.NewTimer(requestRetrySeconds * time.Second)
} else {
}

retryTimer := time.NewTimer(requestRetrySeconds * time.Second)
if bpr.height-poolHeight < 2 {
fmt.Println("quick timer")
retryTimer = time.NewTimer(5 * time.Second)
}

Expand Down

0 comments on commit 2bc07a4

Please sign in to comment.