miner crash due to blockchain db close

This commit is contained in:
Bas van Kervel 2015-05-26 14:33:11 +02:00
parent cc318ff8db
commit 31272f12b3

View file

@ -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