diff --git a/node/modules/services.go b/node/modules/services.go index 2fbd3d299..62f8063e9 100644 --- a/node/modules/services.go +++ b/node/modules/services.go @@ -85,12 +85,12 @@ func RunChainExchange(h host.Host, svc exchange.Server) { } func waitForSync(stmgr *stmgr.StateManager, epochs int, subscribe func()) { - nearsync := uint64(epochs) * uint64(build.BlockDelaySecs) * uint64(time.Second) //nolint + nearsync := uint64(epochs) * uint64(build.BlockDelaySecs) //nolint // early check, are we synced at start up? ts := stmgr.ChainStore().GetHeaviestTipSet() timestamp := ts.MinTimestamp() - now := uint64(build.Clock.Now().UnixNano()) + now := uint64(build.Clock.Now().Unix()) if timestamp > now-nearsync { subscribe() return @@ -110,7 +110,7 @@ func waitForSync(stmgr *stmgr.StateManager, epochs int, subscribe func()) { } } - now := uint64(build.Clock.Now().UnixNano()) + now := uint64(build.Clock.Now().Unix()) if latest > now-nearsync { subscribe() return store.ErrNotifeeDone