good morning!!!!

Skip to content
Snippets Groups Projects
Commit 73123bf2 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Only set TD if it's actually higher

parent 73c4ca3a
Branches
No related tags found
No related merge requests found
...@@ -267,7 +267,10 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { ...@@ -267,7 +267,10 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
} }
self.add(block) self.add(block)
if td.Cmp(self.TD) > 0 {
self.SetTotalDifficulty(td) self.SetTotalDifficulty(td)
}
self.eventMux.Post(NewBlockEvent{block}) self.eventMux.Post(NewBlockEvent{block})
self.eventMux.Post(messages) self.eventMux.Post(messages)
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment