ffiwrapper: Fix UnsealPiece
This commit is contained in:
parent
56570a2200
commit
9af64c9b21
@ -254,7 +254,10 @@ func (sb *Sealer) UnsealPiece(ctx context.Context, sector abi.SectorID, offset s
|
|||||||
defer sealed.Close()
|
defer sealed.Close()
|
||||||
|
|
||||||
var at, nextat abi.PaddedPieceSize
|
var at, nextat abi.PaddedPieceSize
|
||||||
for {
|
first := true
|
||||||
|
for first || toUnseal.HasNext() {
|
||||||
|
first = false
|
||||||
|
|
||||||
piece, err := toUnseal.NextRun()
|
piece, err := toUnseal.NextRun()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return xerrors.Errorf("getting next range to unseal: %w", err)
|
return xerrors.Errorf("getting next range to unseal: %w", err)
|
||||||
|
@ -22,4 +22,4 @@ func FileSize(path string) (SizeInfo, error) {
|
|||||||
return SizeInfo{
|
return SizeInfo{
|
||||||
stat.Blocks * 512,
|
stat.Blocks * 512,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user