fix(events): check for sync-in-progress (#11932)

This commit is contained in:
Rod Vagg 2024-04-29 12:19:58 +10:00 committed by GitHub
parent 0a28ce471e
commit ae2cc67f96
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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()