Merge pull request #366 from filecoin-project/misc/block-past-struc

Make the `mined block in the past` structured
This commit is contained in:
Jakub Sztandera 2019-10-14 16:01:57 +02:00 committed by GitHub
commit f9dde3d10a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -179,7 +179,8 @@ func (m *Miner) mine(ctx context.Context) {
if time.Now().Before(btime) { if time.Now().Before(btime) {
time.Sleep(time.Until(btime)) time.Sleep(time.Until(btime))
} else { } 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 { if err := m.api.ChainSubmitBlock(ctx, b); err != nil {