v1.27.0-a #10

Closed
jonathanface wants to merge 473 commits from v1.27.0-a into master
Showing only changes of commit 3b5165358a - Show all commits

View File

@ -176,6 +176,8 @@ func BuildTreeD(data io.Reader, unpaddedData bool, outPath string, size abi.Padd
// start processing // start processing
workWg.Add(1) workWg.Add(1)
go func(startOffset uint64) { go func(startOffset uint64) {
defer workWg.Done()
if unpaddedData { if unpaddedData {
paddedBuf := pool.Get(int(abi.UnpaddedPieceSize(len(workBuffer[0])).Padded())) paddedBuf := pool.Get(int(abi.UnpaddedPieceSize(len(workBuffer[0])).Padded()))
fr32.PadSingle(workBuffer[0], paddedBuf) fr32.PadSingle(workBuffer[0], paddedBuf)
@ -214,8 +216,6 @@ func BuildTreeD(data io.Reader, unpaddedData bool, outPath string, size abi.Padd
bufLk.Lock() bufLk.Lock()
workerBuffers = append(workerBuffers, workBuffer) workerBuffers = append(workerBuffers, workBuffer)
bufLk.Unlock() bufLk.Unlock()
workWg.Done()
}(processed) }(processed)
processed += processedSize processed += processedSize