diff options
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index 7acd171ec..7d4aeaab6 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -267,7 +267,10 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error { } self.add(block) - self.SetTotalDifficulty(td) + if td.Cmp(self.TD) > 0 { + self.SetTotalDifficulty(td) + } + self.eventMux.Post(NewBlockEvent{block}) self.eventMux.Post(messages) } |