diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 55fe784b76..1b13f584df 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -32,6 +32,7 @@ import ( "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/cmd/utils" "github.com/ethereum/go-ethereum/console" + "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/eth/downloader" "github.com/ethereum/go-ethereum/eth" "github.com/ethereum/go-ethereum/ethclient" @@ -353,7 +354,8 @@ func startNode(ctx *cli.Context, stack *node.Node) { if headers == nil { return } - if 600 >= time.Now().Unix()-headers.Time.Unix() { + latest :=headers.Data.(*types.Header).Time + if 600 >= time.Now().Unix()-latest.Int64() { log.Info("Synchronisation completed, checking", "check", exitWhenSynced) time.Sleep(exitWhenSynced) stack.Stop()