OSDN Git Service

bug fix
authorshenao78 <shenao.78@163.com>
Wed, 12 Jun 2019 06:50:33 +0000 (14:50 +0800)
committershenao78 <shenao.78@163.com>
Wed, 12 Jun 2019 06:50:33 +0000 (14:50 +0800)
protocol/consensus_node_manager.go

index 1caec18..689641f 100644 (file)
@@ -135,7 +135,8 @@ func (c *consensusNodeManager) reorganizeVoteResult(voteResult *state.VoteResult
                if forkChainNode.Height >= mainChainNode.Height {
                        attachNodes = append([]*state.BlockNode{forkChainNode}, attachNodes...)
                        forkChainNode = forkChainNode.Parent
-               } else if forkChainNode.Height <= mainChainNode.Height {
+               } 
+               if forkChainNode.Height <= mainChainNode.Height {
                        detachNodes = append(detachNodes, mainChainNode)
                        mainChainNode = mainChainNode.Parent
                }