Merge pull request #1949 from filecoin-project/feat/no-mbase-update-err
don't update the mining base if mining fails for some reason
This commit is contained in:
commit
5f4efedbdd
@ -153,13 +153,14 @@ func (m *Miner) mine(ctx context.Context) {
|
|||||||
m.niceSleep(build.BlockDelay * time.Second)
|
m.niceSleep(build.BlockDelay * time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
lastBase = *base
|
|
||||||
|
|
||||||
b, err := m.mineOne(ctx, base)
|
b, err := m.mineOne(ctx, base)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("mining block failed: %+v", err)
|
log.Errorf("mining block failed: %+v", err)
|
||||||
|
m.niceSleep(time.Second)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
lastBase = *base
|
||||||
|
|
||||||
onDone(b != nil)
|
onDone(b != nil)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user