From f6de16e95afc31b06c7e71e184e781f79cbd9649 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Fri, 26 Nov 2021 18:16:53 +0100 Subject: [PATCH] Fix sector-storage tests --- extern/sector-storage/mock/mock.go | 2 -- extern/sector-storage/piece_provider_test.go | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/extern/sector-storage/mock/mock.go b/extern/sector-storage/mock/mock.go index d3a18c15a..3acf3dc41 100644 --- a/extern/sector-storage/mock/mock.go +++ b/extern/sector-storage/mock/mock.go @@ -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{} diff --git a/extern/sector-storage/piece_provider_test.go b/extern/sector-storage/piece_provider_test.go index eb3ffa7c3..0abba1bd8 100644 --- a/extern/sector-storage/piece_provider_test.go +++ b/extern/sector-storage/piece_provider_test.go @@ -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)