don't update the mining base if mining fails for some reason

This commit is contained in:
Jeromy 2020-06-08 09:51:47 -07:00
parent 3b56288a5e
commit 9d49c6861f

View File

@ -153,13 +153,14 @@ func (m *Miner) mine(ctx context.Context) {
m.niceSleep(build.BlockDelay * time.Second)
continue
}
lastBase = *base
b, err := m.mineOne(ctx, base)
if err != nil {
log.Errorf("mining block failed: %+v", err)
m.niceSleep(time.Second)
continue
}
lastBase = *base
onDone(b != nil)