fix: replace panic with err in OnDealExpiredOrSlashed

This commit is contained in:
Dirk McCormick 2021-02-04 11:58:08 +01:00
parent c7e7f89026
commit aa8ac05d6b

View File

@ -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]