diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-02 14:15:51 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-02 14:15:51 +0800 |
commit | 35f3fe0b857e8006de345505d7fc09c0b7c10326 (patch) | |
tree | 2c4383122604620caeace6d225f8035f43d3b792 /core/utils/utils.go | |
parent | 7e85e9475ef303356ccdbcbfe8219ac1173db418 (diff) | |
download | dexon-consensus-35f3fe0b857e8006de345505d7fc09c0b7c10326.tar dexon-consensus-35f3fe0b857e8006de345505d7fc09c0b7c10326.tar.gz dexon-consensus-35f3fe0b857e8006de345505d7fc09c0b7c10326.tar.bz2 dexon-consensus-35f3fe0b857e8006de345505d7fc09c0b7c10326.tar.lz dexon-consensus-35f3fe0b857e8006de345505d7fc09c0b7c10326.tar.xz dexon-consensus-35f3fe0b857e8006de345505d7fc09c0b7c10326.tar.zst dexon-consensus-35f3fe0b857e8006de345505d7fc09c0b7c10326.zip |
core: only qualified nodes can participant BA (#540)
* core: only qualified nodes can participant BA
* core: remove leader calculation from node set cache
Diffstat (limited to 'core/utils/utils.go')
-rw-r--r-- | core/utils/utils.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/utils/utils.go b/core/utils/utils.go index e6739ce..1a372c7 100644 --- a/core/utils/utils.go +++ b/core/utils/utils.go @@ -144,6 +144,11 @@ func GetDKGValidThreshold(config *types.Config) int { return int(config.NotarySetSize * 5 / 6) } +// GetBAThreshold return threshold for BA votes. +func GetBAThreshold(config *types.Config) int { + return int(config.NotarySetSize*2/3 + 1) +} + // GetNextRoundValidationHeight returns the block height to check if the next // round is ready. func GetNextRoundValidationHeight(begin, length uint64) uint64 { |