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 Jun 18, 2021
1 parent 77a8eef commit 9696ea6
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 9696ea6

Please sign in to comment.