don't update the mining base if mining fails for some reason
This commit is contained in:
parent
3b56288a5e
commit
9d49c6861f
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user