aboutsummaryrefslogtreecommitdiffstats
path: root/core/syncer/agreement.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-12-04 09:52:11 +0800
committerGitHub <noreply@github.com>2018-12-04 09:52:11 +0800
commit041eb53f043e6a4a7a9acab1ce46ecfd268fed57 (patch)
tree90ed112f4dbdab02f7a0542c8db40e9060b5ef32 /core/syncer/agreement.go
parent2e119344b3ecddd2cf07094c89249ab631901c4f (diff)
downloaddexon-consensus-041eb53f043e6a4a7a9acab1ce46ecfd268fed57.tar
dexon-consensus-041eb53f043e6a4a7a9acab1ce46ecfd268fed57.tar.gz
dexon-consensus-041eb53f043e6a4a7a9acab1ce46ecfd268fed57.tar.bz2
dexon-consensus-041eb53f043e6a4a7a9acab1ce46ecfd268fed57.tar.lz
dexon-consensus-041eb53f043e6a4a7a9acab1ce46ecfd268fed57.tar.xz
dexon-consensus-041eb53f043e6a4a7a9acab1ce46ecfd268fed57.tar.zst
dexon-consensus-041eb53f043e6a4a7a9acab1ce46ecfd268fed57.zip
core: construct consensus from syncer (#352)
Diffstat (limited to 'core/syncer/agreement.go')
-rw-r--r--core/syncer/agreement.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/syncer/agreement.go b/core/syncer/agreement.go
index 89b8c8d..fee4624 100644
--- a/core/syncer/agreement.go
+++ b/core/syncer/agreement.go
@@ -105,6 +105,10 @@ func (a *agreement) processBlock(b *types.Block) {
func (a *agreement) processAgreementResult(r *types.AgreementResult) {
// Cache those results that CRS is not ready yet.
+ if _, exists := a.confirmedBlocks[r.BlockHash]; exists {
+ a.logger.Info("agreement result already confirmed", "result", r)
+ return
+ }
if r.Position.Round > a.latestCRSRound {
pendingsForRound, exists := a.pendings[r.Position.Round]
if !exists {