aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-04-08 16:14:27 +0800
committerJimmy Hu <jimmy.hu@dexon.org>2019-04-08 16:14:27 +0800
commit26c83d1cd15ab9225cb13d7324ac721b00a3fcd1 (patch)
tree619536ead56abe2eacb4d165422ddddf6f7bbf23 /core/consensus.go
parent337b5729c1cea837ac5ee8e1646dca587f52ebbd (diff)
downloaddexon-consensus-26c83d1cd15ab9225cb13d7324ac721b00a3fcd1.tar
dexon-consensus-26c83d1cd15ab9225cb13d7324ac721b00a3fcd1.tar.gz
dexon-consensus-26c83d1cd15ab9225cb13d7324ac721b00a3fcd1.tar.bz2
dexon-consensus-26c83d1cd15ab9225cb13d7324ac721b00a3fcd1.tar.lz
dexon-consensus-26c83d1cd15ab9225cb13d7324ac721b00a3fcd1.tar.xz
dexon-consensus-26c83d1cd15ab9225cb13d7324ac721b00a3fcd1.tar.zst
dexon-consensus-26c83d1cd15ab9225cb13d7324ac721b00a3fcd1.zip
core: refine VerifyAgreementResult (#553)
* Pass notary set directly to VerifyAgreementResult * Fix core.Consensus * Fix syncer
Diffstat (limited to 'core/consensus.go')
-rw-r--r--core/consensus.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/consensus.go b/core/consensus.go
index ca7d10f..6c300c9 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -1338,7 +1338,11 @@ func (con *Consensus) ProcessAgreementResult(
return nil
}
// Sanity Check.
- if err := VerifyAgreementResult(rand, con.nodeSetCache); err != nil {
+ notarySet, err := con.nodeSetCache.GetNotarySet(rand.Position.Round)
+ if err != nil {
+ return err
+ }
+ if err := VerifyAgreementResult(rand, notarySet); err != nil {
con.baMgr.untouchAgreementResult(rand)
return err
}