Only set TD if it's actually higher

This commit is contained in:
obscuren 2014-12-04 15:35:21 +01:00
parent 73c4ca3a6f
commit 73123bf257

View File

@ -267,7 +267,10 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
}
self.add(block)
if td.Cmp(self.TD) > 0 {
self.SetTotalDifficulty(td)
}
self.eventMux.Post(NewBlockEvent{block})
self.eventMux.Post(messages)
}