Skip to content

Commit

Permalink
fix: mark node without new block as not synced (#54)
Browse files Browse the repository at this point in the history
because sometimes nodes are not sync but with `catchingUp: false`
  • Loading branch information
MattKetmo authored Jan 18, 2024
1 parent a933a4b commit 564aa17
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/rpc/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ func (n *Node) IsSynced() bool {
return false
}

return !status.SyncInfo.CatchingUp
return !status.SyncInfo.CatchingUp &&
status.SyncInfo.LatestBlockTime.After(time.Now().Add(-120*time.Second))
}

func (n *Node) ChainID() string {
Expand Down

0 comments on commit 564aa17

Please sign in to comment.