diff options
author | Mission Liao <mission.liao@dexon.org> | 2019-04-08 16:14:27 +0800 |
---|---|---|
committer | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-08 16:14:27 +0800 |
commit | 26c83d1cd15ab9225cb13d7324ac721b00a3fcd1 (patch) | |
tree | 619536ead56abe2eacb4d165422ddddf6f7bbf23 /core/utils.go | |
parent | 337b5729c1cea837ac5ee8e1646dca587f52ebbd (diff) | |
download | dexon-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/utils.go')
-rw-r--r-- | core/utils.go | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/utils.go b/core/utils.go index 0250cf2..c9d5f84 100644 --- a/core/utils.go +++ b/core/utils.go @@ -158,17 +158,13 @@ func HashConfigurationBlock( // VerifyAgreementResult perform sanity check against a types.AgreementResult // instance. func VerifyAgreementResult( - res *types.AgreementResult, cache *utils.NodeSetCache) error { + res *types.AgreementResult, notarySet map[types.NodeID]struct{}) error { if res.Position.Round >= DKGDelayRound { if len(res.Randomness) == 0 { return ErrMissingRandomness } return nil } - notarySet, err := cache.GetNotarySet(res.Position.Round) - if err != nil { - return err - } if len(res.Votes) < len(notarySet)*2/3+1 { return ErrNotEnoughVotes } |