Merge sectorbuilder into sectorstorage

This commit is contained in:
Łukasz Magiera 2020-03-26 03:50:56 +01:00
parent a975f018c5
commit 2dfa38f572

View File

@ -3,8 +3,8 @@ package sealing
import (
"bytes"
"context"
"github.com/filecoin-project/lotus/storage/sectorstorage/zerocomm"
"github.com/filecoin-project/go-sectorbuilder"
"github.com/ipfs/go-cid"
cbg "github.com/whyrusleeping/cbor-gen"
"golang.org/x/xerrors"
@ -42,7 +42,7 @@ func checkPieces(ctx context.Context, si SectorInfo, api sealingApi) error {
for i, piece := range si.Pieces {
if piece.DealID == nil {
exp := sectorbuilder.ZeroPieceCommitment(piece.Size)
exp := zerocomm.ZeroPieceCommitment(piece.Size)
if piece.CommP != exp {
return &ErrInvalidPiece{xerrors.Errorf("deal %d piece %d had non-zero CommP %+v", piece.DealID, i, piece.CommP)}
}