Merge pull request #1204 from carver/deep-log-crashfix

crash fix: skip deep log if self.chain is not caught up
This commit is contained in:
Jeffrey Wilcke 2015-06-08 13:35:11 -07:00
commit 75522f95ce
1 changed files with 1 additions and 1 deletions

View File

@ -352,7 +352,7 @@ func (self *worker) isBlockLocallyMined(deepBlockNum uint64) bool {
//Does the block at {deepBlockNum} send earnings to my coinbase?
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) {