Skip to content

Commit

Permalink
Merge pull request #1454 from 0chain/hotfix/init-queue
Browse files Browse the repository at this point in the history
init queue after meta result
  • Loading branch information
dabasov authored Apr 5, 2024
2 parents d57a542 + 3dfcba7 commit bf55293
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions zboxcore/sdk/blockdownloadworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ func AddBlockDownloadReq(ctx context.Context, req *BlockDownloadRequest, rb zbox
if len(req.respBuf) == 0 {
req.respBuf = make([]byte, int(req.numBlocks)*effectiveBlockSize)
}
} else {
req.respBuf = make([]byte, int(req.numBlocks)*effectiveBlockSize)
}
downloadBlockChan[req.blobber.ID] <- req
}
1 change: 1 addition & 0 deletions zboxcore/sdk/downloadworker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,7 @@ func (req *DownloadRequest) getFileMetaConsensus(fMetaResp []*fileMetaResponse)
return nil, fmt.Errorf("consensus_not_met")
}
req.downloadMask = foundMask
heap.Init(&req.downloadQueue)
return selected.fileref, nil
}

Expand Down

0 comments on commit bf55293

Please sign in to comment.