mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
cmd/geth: added in correct time field with type assertion
This commit is contained in:
parent
b939822a4c
commit
eeaef14de9
1 changed files with 3 additions and 1 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Reference in a new issue