Only set TD if it's actually higher
This commit is contained in:
parent
73c4ca3a6f
commit
73123bf257
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user