From 895eb476b4957925e127777aa011a5080c4e88a7 Mon Sep 17 00:00:00 2001 From: Aayush Rajasekaran Date: Tue, 18 Jan 2022 18:54:33 -0500 Subject: [PATCH] fix: checkReplica incorrectly returns ErrBadPR --- extern/storage-sealing/checks.go | 2 +- extern/storage-sealing/states_failed.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extern/storage-sealing/checks.go b/extern/storage-sealing/checks.go index 42425e782..3525c84a7 100644 --- a/extern/storage-sealing/checks.go +++ b/extern/storage-sealing/checks.go @@ -213,7 +213,7 @@ func checkReplicaUpdate(ctx context.Context, maddr address.Address, si SectorInf return &ErrBadRU{xerrors.Errorf("nil sealed cid")} } if si.ReplicaUpdateProof == nil { - return ErrBadPR{xerrors.Errorf("nil PR2 proof")} + return &ErrBadPR{xerrors.Errorf("nil PR2 proof")} } return nil diff --git a/extern/storage-sealing/states_failed.go b/extern/storage-sealing/states_failed.go index 0d7c08ce5..c32ac4c3a 100644 --- a/extern/storage-sealing/states_failed.go +++ b/extern/storage-sealing/states_failed.go @@ -233,7 +233,7 @@ func (m *Sealing) handleSubmitReplicaUpdateFailed(ctx statemachine.Context, sect return ctx.Send(SectorDealsExpired{xerrors.Errorf("expired dealIDs in sector: %w", err)}) default: log.Errorf("sanity check error, not proceeding: +%v", err) - return xerrors.Errorf("checkPieces sanity check error: %w", err) + return xerrors.Errorf("checkReplica sanity check error: %w", err) } }