crash fix: skip deep log if self.chain is not caught up

@see trace https://gist.github.com/eupraxic/87fdfefe702c51d5944d
pull/1204/head
Jason Carver 10 years ago
parent 44e5ff7d15
commit a9c058dfe0
  1. 2
      miner/worker.go

@ -352,7 +352,7 @@ func (self *worker) isBlockLocallyMined(deepBlockNum uint64) bool {
//Does the block at {deepBlockNum} send earnings to my coinbase? //Does the block at {deepBlockNum} send earnings to my coinbase?
var block = self.chain.GetBlockByNumber(deepBlockNum) var block = self.chain.GetBlockByNumber(deepBlockNum)
return block.Header().Coinbase == self.coinbase return block != nil && block.Header().Coinbase == self.coinbase
} }
func (self *worker) logLocalMinedBlocks(previous *environment) { func (self *worker) logLocalMinedBlocks(previous *environment) {

Loading…
Cancel
Save