diff --git a/extern/sector-storage/mock/mock.go b/extern/sector-storage/mock/mock.go index 4d0592d36..8eaed54f6 100644 --- a/extern/sector-storage/mock/mock.go +++ b/extern/sector-storage/mock/mock.go @@ -390,14 +390,16 @@ func (mgr *SectorMgr) ReadPiece(ctx context.Context, sector storage.SectorRef, o panic("implme") } + br := bytes.NewReader(mgr.pieces[mgr.sectors[sector.ID].pieces[0]][:size]) + return struct { io.ReadCloser io.Seeker io.ReaderAt }{ - ReadCloser: ioutil.NopCloser(bytes.NewReader(mgr.pieces[mgr.sectors[sector.ID].pieces[0]][:size])), - Seeker: nil, - ReaderAt: nil, + ReadCloser: ioutil.NopCloser(br), + Seeker: br, + ReaderAt: br, }, false, nil }