Skip to content

Commit

Permalink
blockNum compare issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Zephaniahy committed Jan 16, 2024
1 parent c2fb3a9 commit 1f351f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion explorer/scan.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ func (e *Explorer) updateBlockLatestNumberTiming() {

func (e *Explorer) syncLatestBlockNumber() error {
// Add latency updating strategy for history data sync
if e.latestBlockNum.Load()-e.currentBlockNum.Load() > 100 {
if e.latestBlockNum.Load() > e.currentBlockNum.Load() && e.latestBlockNum.Load()-e.currentBlockNum.Load() > 100 {
return nil
}

Expand Down

0 comments on commit 1f351f8

Please sign in to comment.