From 4bbe5abf818239c83ef332508f0aca8b35f63653 Mon Sep 17 00:00:00 2001 From: whyrusleeping Date: Wed, 29 Jul 2020 14:20:07 -0700 Subject: [PATCH] improve slow block production logs --- miner/miner.go | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/miner/miner.go b/miner/miner.go index a6b18c3fe..399268553 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -367,15 +367,14 @@ func (m *Miner) mineOne(ctx context.Context, base *MiningBase) (*types.BlockMsg, dur := tCreateBlock.Sub(start) log.Infow("mined new block", "cid", b.Cid(), "height", b.Header.Height, "took", dur) if dur > time.Second*time.Duration(build.BlockDelaySecs) { - log.Warn("CAUTION: block production took longer than the block delay. Your computer may not be fast enough to keep up") - - log.Warnw("tMinerBaseInfo ", "duration", tMBI.Sub(start)) - log.Warnw("tDrand ", "duration", tDrand.Sub(tMBI)) - log.Warnw("tPowercheck ", "duration", tPowercheck.Sub(tDrand)) - log.Warnw("tTicket ", "duration", tTicket.Sub(tPowercheck)) - log.Warnw("tSeed ", "duration", tSeed.Sub(tTicket)) - log.Warnw("tPending ", "duration", tPending.Sub(tSeed)) - log.Warnw("tCreateBlock ", "duration", tCreateBlock.Sub(tPending)) + log.Warnw("CAUTION: block production took longer than the block delay. Your computer may not be fast enough to keep up", + "tMinerBaseInfo ", tMBI.Sub(start), + "tDrand ", tDrand.Sub(tMBI), + "tPowercheck ", tPowercheck.Sub(tDrand), + "tTicket ", tTicket.Sub(tPowercheck), + "tSeed ", tSeed.Sub(tTicket), + "tPending ", tPending.Sub(tSeed), + "tCreateBlock ", tCreateBlock.Sub(tPending)) } return b, nil