Merge pull request #7310 from swift-mx/master

fix: check padSector Cid
This commit is contained in:
Łukasz Magiera 2021-09-10 03:39:48 -07:00 committed by GitHub
commit 65befc281e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -95,7 +95,7 @@ func (m *Sealing) padSector(ctx context.Context, sectorID storage.SectorRef, exi
if err != nil { if err != nil {
return nil, xerrors.Errorf("add piece: %w", err) return nil, xerrors.Errorf("add piece: %w", err)
} }
if !expectCid.Equals(expectCid) { if !expectCid.Equals(ppi.PieceCID) {
return nil, xerrors.Errorf("got unexpected padding piece CID: expected:%s, got:%s", expectCid, ppi.PieceCID) return nil, xerrors.Errorf("got unexpected padding piece CID: expected:%s, got:%s", expectCid, ppi.PieceCID)
} }