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:
Łukasz Magiera 2020-06-08 18:56:48 +02:00 committed by GitHub
commit 5f4efedbdd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)