Skip to content

Commit

Permalink
Merge pull request #8121 from filecoin-project/asr/nil-update
Browse files Browse the repository at this point in the history
sealer: fix error message
  • Loading branch information
magik6k authored Feb 17, 2022
2 parents f17bbc9 + 36aa243 commit 3622483
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions extern/storage-sealing/checks.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,13 @@ func checkReplicaUpdate(ctx context.Context, maddr address.Address, si SectorInf
if err != nil {
return &ErrApi{xerrors.Errorf("calling StateComputeDataCommitment: %w", err)}
}
if si.UpdateUnsealed == nil || !commD.Equals(*si.UpdateUnsealed) {
return &ErrBadRU{xerrors.Errorf("on chain CommD differs from sector: %s != %s", commD, si.CommD)}

if si.UpdateUnsealed == nil {
return &ErrBadRU{xerrors.New("nil UpdateUnsealed cid after replica update")}
}

if !commD.Equals(*si.UpdateUnsealed) {
return &ErrBadRU{xerrors.Errorf("calculated CommD differs from updated replica: %s != %s", commD, *si.UpdateUnsealed)}
}

if si.UpdateSealed == nil {
Expand Down

0 comments on commit 3622483

Please sign in to comment.