diff --git a/miner/worker.go b/miner/worker.go index 5e4ff7510f..eb8fe90057 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -288,6 +288,10 @@ func (self *worker) makeCurrent() { current.ownedAccounts = accountAddressesSet(accounts) parent := self.chain.GetBlock(current.block.ParentHash()) + if parent == nil { + // in case geth quits the blockchain db can be closed and this returns nil + return + } current.coinbase.SetGasPool(core.CalcGasLimit(parent)) self.current = current