fix pledgeReader with small sectors
This commit is contained in:
parent
87f7315f5a
commit
b6ba0ed47c
@ -18,6 +18,9 @@ import (
|
|||||||
|
|
||||||
func (m *Sealing) pledgeReader(size uint64, parts uint64) io.Reader {
|
func (m *Sealing) pledgeReader(size uint64, parts uint64) io.Reader {
|
||||||
parts = 1 << bits.Len64(parts) // round down to nearest power of 2
|
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)
|
piece := sectorbuilder.UserBytesForSectorSize((size/127 + size) / parts)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user