fix pledgeReader with small sectors

This commit is contained in:
Łukasz Magiera 2020-01-31 20:07:20 +01:00
parent 52ff34c13e
commit edfbe71b0f

View File

@ -18,6 +18,9 @@ import (
func (m *Sealing) pledgeReader(size uint64, parts uint64) io.Reader {
parts = 1 << bits.Len64(parts) // round down to nearest power of 2
if size/parts < 127 {
parts = size / 127
}
piece := sectorbuilder.UserBytesForSectorSize((size/127 + size) / parts)