aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/utils/utils.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/utils/utils.go')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus/core/utils/utils.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/utils/utils.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/utils/utils.go
index e6739ce2b..1a372c70c 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus/core/utils/utils.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus/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 {