From 9d49c6861f7be4a96000d842e1b0eedfd1cf0219 Mon Sep 17 00:00:00 2001 From: Jeromy Date: Mon, 8 Jun 2020 09:51:47 -0700 Subject: [PATCH] don't update the mining base if mining fails for some reason --- miner/miner.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/miner/miner.go b/miner/miner.go index e906e6e70..f2059ef7f 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -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)