Skip to content

Commit

Permalink
Use GetLastConfirmedBlockNum to set checkForMissedEvents startBlock
Browse files Browse the repository at this point in the history
  • Loading branch information
bitwiseguy committed Oct 9, 2023
1 parent 471e0d7 commit 3b27f46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/engine/chainservice/eth_chainservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -372,11 +372,11 @@ func (ecs *EthChainService) listenForEventLogs(errorChan chan<- error, eventChan
return

case err := <-ecs.eventSub.Err():
latestBlockNum := ecs.GetLastConfirmedBlockNum()

ecs.eventTracker.mu.Lock()
defer ecs.eventTracker.mu.Unlock()

latestBlockNum := ecs.eventTracker.latestBlockNum

if err != nil {
ecs.logger.Warn("error in chain event subscription: " + err.Error())
ecs.eventSub.Unsubscribe()
Expand Down

0 comments on commit 3b27f46

Please sign in to comment.