[NOD-436] Remove unnecessary check before sending a chainChanged notification. (#478)

This commit is contained in:
stasatdaglabs 2019-11-18 14:49:27 +02:00 committed by Ori Newman
parent 63bfac9740
commit ea846a3284

View File

@ -97,7 +97,7 @@ func (dag *BlockDAG) maybeAcceptBlock(block *util.Block, flags BehaviorFlags) er
Block: block,
WasUnorphaned: flags&BFWasUnorphaned != 0,
})
if len(chainUpdates.removedChainBlockHashes) > 0 || len(chainUpdates.addedChainBlockHashes) > 0 {
if len(chainUpdates.addedChainBlockHashes) > 0 {
dag.sendNotification(NTChainChanged, &ChainChangedNotificationData{
RemovedChainBlockHashes: chainUpdates.removedChainBlockHashes,
AddedChainBlockHashes: chainUpdates.addedChainBlockHashes,