From a33784c4346f7072aaba469c051893c3bfb8ecba Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Wed, 26 Aug 2020 14:48:53 -0700 Subject: [PATCH] print block 'age' when validating blocks during sync --- chain/sync.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chain/sync.go b/chain/sync.go index eae5dfcff..0e5f1a126 100644 --- a/chain/sync.go +++ b/chain/sync.go @@ -655,7 +655,7 @@ func (syncer *Syncer) ValidateBlock(ctx context.Context, b *types.FullBlock) (er validationStart := build.Clock.Now() defer func() { stats.Record(ctx, metrics.BlockValidationDurationMilliseconds.M(metrics.SinceInMilliseconds(validationStart))) - log.Infow("block validation", "took", time.Since(validationStart), "height", b.Header.Height) + log.Infow("block validation", "took", time.Since(validationStart), "height", b.Header.Height, "age", time.Since(time.Unix(int64(b.Header.Timestamp), 0))) }() ctx, span := trace.StartSpan(ctx, "validateBlock")