diff options
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go index b9da4f0e3..d12d30a6a 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go @@ -660,7 +660,8 @@ func (con *Consensus) initialRound( // unexpected network fluctuation and ensure the robustness. for (con.gov.CRS(nextRound) == common.Hash{}) { con.logger.Info("CRS is not ready yet. Try again later...", - "nodeID", con.ID) + "nodeID", con.ID, + "round", nextRound) time.Sleep(500 * time.Millisecond) } nextDkgSet, err := con.nodeSetCache.GetDKGSet(nextRound) @@ -718,7 +719,6 @@ func (con *Consensus) initialRound( } con.initialRound( startTime.Add(config.RoundInterval), nextRound, nextConfig) - con.round = nextRound }) } @@ -908,9 +908,6 @@ func (con *Consensus) ProcessAgreementResult( if !con.ccModule.blockRegistered(rand.BlockHash) { return nil } - if DiffUint64(con.round, rand.Position.Round) > 1 { - return nil - } // Sanity check done. if !con.cfgModule.touchTSigHash(rand.BlockHash) { return nil @@ -1005,9 +1002,8 @@ func (con *Consensus) preProcessBlock(b *types.Block) (err error) { // deliverBlock deliver a block to application layer. func (con *Consensus) deliverBlock(b *types.Block) { - // TODO(mission): clone types.FinalizationResult con.logger.Debug("Calling Application.BlockDelivered", "block", b) - con.app.BlockDelivered(b.Hash, b.Position, b.Finalization) + con.app.BlockDelivered(b.Hash, b.Position, b.Finalization.Clone()) if b.Position.Round+roundShift == con.roundToNotify { // Only the first block delivered of that round would // trigger this noitification. |