diff --git a/markets/storageadapter/client.go b/markets/storageadapter/client.go index 4d00ab258..88a50931a 100644 --- a/markets/storageadapter/client.go +++ b/markets/storageadapter/client.go @@ -264,7 +264,7 @@ func (c *ClientNodeAdapter) OnDealExpiredOrSlashed(ctx context.Context, dealID a // and the chain has advanced to the confidence height stateChanged := func(ts *types.TipSet, ts2 *types.TipSet, states events.StateChange, h abi.ChainEpoch) (more bool, err error) { // Check if the deal has already expired - if sd.Proposal.EndEpoch <= ts2.Height() { + if ts2 == nil || sd.Proposal.EndEpoch <= ts2.Height() { onDealExpired(nil) return false, nil } diff --git a/markets/storageadapter/provider.go b/markets/storageadapter/provider.go index 79fd718f8..4ce32d2bf 100644 --- a/markets/storageadapter/provider.go +++ b/markets/storageadapter/provider.go @@ -344,7 +344,7 @@ func (n *ProviderNodeAdapter) OnDealExpiredOrSlashed(ctx context.Context, dealID // and the chain has advanced to the confidence height stateChanged := func(ts *types.TipSet, ts2 *types.TipSet, states events.StateChange, h abi.ChainEpoch) (more bool, err error) { // Check if the deal has already expired - if sd.Proposal.EndEpoch <= ts2.Height() { + if ts2 == nil || sd.Proposal.EndEpoch <= ts2.Height() { onDealExpired(nil) return false, nil }