diff --git a/markets/storageadapter/provider.go b/markets/storageadapter/provider.go index 788fd769a..c6d3a2a8f 100644 --- a/markets/storageadapter/provider.go +++ b/markets/storageadapter/provider.go @@ -379,6 +379,11 @@ func (n *ProviderNodeAdapter) OnDealExpiredOrSlashed(ctx context.Context, dealID // Called immediately to check if the deal has already expired or been slashed checkFunc := func(ts *types.TipSet) (done bool, more bool, err error) { + if ts == nil { + // keep listening for events + return false, true, nil + } + // Check if the deal has already expired if sd.Proposal.EndEpoch <= ts.Height() { onDealExpired(nil)