Fix sector-storage tests

This commit is contained in:
Łukasz Magiera 2021-11-26 18:16:53 +01:00
parent a9ee263682
commit f6de16e95a
2 changed files with 1 additions and 3 deletions

View File

@ -5,7 +5,6 @@ import (
"context"
"crypto/sha256"
"fmt"
sectorstorage "github.com/filecoin-project/lotus/extern/sector-storage"
"io"
"io/ioutil"
"math/rand"
@ -626,4 +625,3 @@ var MockProver = MockVerifier
var _ storage.Sealer = &SectorMgr{}
var _ ffiwrapper.Verifier = MockVerifier
var _ ffiwrapper.Prover = MockProver
var _ sectorstorage.PieceProvider = &SectorMgr{}

View File

@ -337,7 +337,7 @@ func (p *pieceProviderTestHarness) isUnsealed(t *testing.T, offset storiface.Unp
func (p *pieceProviderTestHarness) readPiece(t *testing.T, offset storiface.UnpaddedByteIndex, size abi.UnpaddedPieceSize,
expectedHadToUnseal bool, expectedBytes []byte) {
rd, isUnsealed, err := p.pp.ReadPiece(p.ctx, p.sector, offset, size, p.ticket, p.commD)
rd, isUnsealed, err := p.pp.ReadPiece(p.ctx, p.sector, offset, 0, size, p.ticket, p.commD)
require.NoError(t, err)
require.NotNil(t, rd)
require.Equal(t, expectedHadToUnseal, isUnsealed)