From ae2cc67f96553dca3e69cd2fa25d94c02e55a1dd Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Mon, 29 Apr 2024 12:19:58 +1000 Subject: [PATCH] fix(events): check for sync-in-progress (#11932) --- chain/events/filter/event.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/chain/events/filter/event.go b/chain/events/filter/event.go index 1669d840eec..0accc551ab4 100644 --- a/chain/events/filter/event.go +++ b/chain/events/filter/event.go @@ -375,6 +375,10 @@ func (m *EventFilterManager) Revert(ctx context.Context, from, to *types.TipSet) func (m *EventFilterManager) Install(ctx context.Context, minHeight, maxHeight abi.ChainEpoch, tipsetCid cid.Cid, addresses []address.Address, keysWithCodec map[string][]types.ActorEventBlock, excludeReverted bool) (EventFilter, error) { m.mu.Lock() + if m.currentHeight == 0 { + // sync in progress, we haven't had an Apply + m.currentHeight = m.ChainStore.GetHeaviestTipSet().Height() + } currentHeight := m.currentHeight m.mu.Unlock()