Make the mined block in the past structured

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-10-14 15:51:51 +02:00
parent b5ed3da230
commit 4ff717e881
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA

View File

@ -179,7 +179,8 @@ func (m *Miner) mine(ctx context.Context) {
if time.Now().Before(btime) {
time.Sleep(time.Until(btime))
} else {
log.Warnf("Mined block in the past: b.T: %s, T: %s, dT: %s", btime, time.Now(), time.Now().Sub(btime))
log.Warnw("mined block in the past", "block-time", btime,
"time", time.Now(), "duration", time.Now().Sub(btime))
}
if err := m.api.ChainSubmitBlock(ctx, b); err != nil {