OSDN Git Service

optimise
authoroys <oys@oysdeMBP.localdomain>
Thu, 4 Jul 2019 01:35:40 +0000 (09:35 +0800)
committeroys <oys@oysdeMBP.localdomain>
Thu, 4 Jul 2019 01:35:40 +0000 (09:35 +0800)
protocol/block.go

index e65140c..76c8b61 100644 (file)
@@ -4,7 +4,6 @@ import (
        log "github.com/sirupsen/logrus"
 
        "github.com/vapor/config"
-       "github.com/vapor/consensus"
        "github.com/vapor/errors"
        "github.com/vapor/event"
        "github.com/vapor/protocol/bc"
@@ -160,14 +159,6 @@ func (c *Chain) reorganizeChain(blockHeader *types.BlockHeader) error {
                        return err
                }
 
-               if detachBlockHeader.Height%consensus.RoundVoteBlockNums == 0 {
-                       hash := detachBlockHeader.Hash()
-                       consensusResult, err = c.GetConsensusResultByHash(&hash)
-                       if err != nil {
-                               return err
-                       }
-               }
-
                if err := consensusResult.DetachBlock(b); err != nil {
                        return err
                }