From 57324efa28dbcfee18666fe33706f9092842611d Mon Sep 17 00:00:00 2001 From: Matthieu Moquet Date: Wed, 17 Jan 2024 14:56:17 +0100 Subject: [PATCH] fix: mark node without new block as not synced --- pkg/rpc/node.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/rpc/node.go b/pkg/rpc/node.go index f09ba0b..596538e 100644 --- a/pkg/rpc/node.go +++ b/pkg/rpc/node.go @@ -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 {