Skip to content

Commit

Permalink
fix: replace panic with err in OnDealExpiredOrSlashed
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed Aug 4, 2021
1 parent cbf4a23 commit 6bc652b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion markets/storageadapter/ondealexpired.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (mgr *DealExpiryManager) OnDealExpiredOrSlashed(ctx context.Context, publis

changedDeals, ok := states.(state.ChangedDeals)
if !ok {
panic("Expected state.ChangedDeals")
return false, xerrors.Errorf("OnDealExpireOrSlashed stateChanged: Expected state.ChangedDeals")
}

deal, ok := changedDeals[res.DealID]
Expand Down

0 comments on commit 6bc652b

Please sign in to comment.