diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-09-20 16:41:59 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-09-20 17:56:35 +0800 |
commit | 0f2ba07c4122fbc2d836a2f374e5da8d8546e99f (patch) | |
tree | e86d2effb259d13ba43e476c81cc786d3f1b71dd /light | |
parent | c37238cae9b83aff0fc2413b3bb37f847c7949d6 (diff) | |
download | go-tangerine-0f2ba07c4122fbc2d836a2f374e5da8d8546e99f.tar go-tangerine-0f2ba07c4122fbc2d836a2f374e5da8d8546e99f.tar.gz go-tangerine-0f2ba07c4122fbc2d836a2f374e5da8d8546e99f.tar.bz2 go-tangerine-0f2ba07c4122fbc2d836a2f374e5da8d8546e99f.tar.lz go-tangerine-0f2ba07c4122fbc2d836a2f374e5da8d8546e99f.tar.xz go-tangerine-0f2ba07c4122fbc2d836a2f374e5da8d8546e99f.tar.zst go-tangerine-0f2ba07c4122fbc2d836a2f374e5da8d8546e99f.zip |
common, core, light: add block age into info logs
Diffstat (limited to 'light')
-rw-r--r-- | light/lightchain.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/light/lightchain.go b/light/lightchain.go index d40a4ee6c..81bdaad75 100644 --- a/light/lightchain.go +++ b/light/lightchain.go @@ -157,7 +157,7 @@ func (self *LightChain) loadLastState() error { // Issue a status log and return header := self.hc.CurrentHeader() headerTd := self.GetTd(header.Hash(), header.Number.Uint64()) - log.Info("Loaded most recent local header", "number", header.Number, "hash", header.Hash(), "td", headerTd) + log.Info("Loaded most recent local header", "number", header.Number, "hash", header.Hash(), "td", headerTd, "age", common.PrettyAge(time.Unix(header.Time.Int64(), 0))) return nil } @@ -488,7 +488,7 @@ func (self *LightChain) SyncCht(ctx context.Context) bool { // Ensure the chain didn't move past the latest block while retrieving it if self.hc.CurrentHeader().Number.Uint64() < header.Number.Uint64() { - log.Info("Updated latest header based on CHT", "number", header.Number, "hash", header.Hash()) + log.Info("Updated latest header based on CHT", "number", header.Number, "hash", header.Hash(), "age", common.PrettyAge(time.Unix(header.Time.Int64(), 0))) self.hc.SetCurrentHeader(header) } return true |