Skip to content

Commit

Permalink
fix: chunk retry not working
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Feb 3, 2025
1 parent 44f8f19 commit 3d39ee0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/statesync/chunks.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ func (q *chunkQueue) Enqueue(chunkIDs ...[]byte) {

func (q *chunkQueue) enqueue(chunkID bytes.HexBytes) {
q.requestQueue = append(q.requestQueue, chunkID)
_, ok := q.items[chunkID.String()]
chunk, ok := q.items[chunkID.String()]
if ok {
// If the chunk is already in the queue, reset its status to initStatus to retry fetching it.
chunk.status = initStatus
return
}
q.items[chunkID.String()] = &chunkItem{
Expand Down

0 comments on commit 3d39ee0

Please sign in to comment.