diff options
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go index c9d5f840f..c4d7b0fc3 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go @@ -158,13 +158,17 @@ func HashConfigurationBlock( // VerifyAgreementResult perform sanity check against a types.AgreementResult // instance. func VerifyAgreementResult( - res *types.AgreementResult, notarySet map[types.NodeID]struct{}) error { + res *types.AgreementResult, cache *NodeSetCache) 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 } |