aboutsummaryrefslogtreecommitdiffstats
path: root/core/utils/utils.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-03-14 18:29:24 +0800
committerGitHub <noreply@github.com>2019-03-14 18:29:24 +0800
commit651282c0790c4d64ecdde2a7174a8f4f77a67e1c (patch)
tree408798ddd2ce32f142e291a9e179b80a9735fe7d /core/utils/utils.go
parent8786160e28cf17c1125e26939b81ac59df5c260a (diff)
downloadtangerine-consensus-651282c0790c4d64ecdde2a7174a8f4f77a67e1c.tar.gz
tangerine-consensus-651282c0790c4d64ecdde2a7174a8f4f77a67e1c.tar.zst
tangerine-consensus-651282c0790c4d64ecdde2a7174a8f4f77a67e1c.zip
test: prohibit dkg (#489)
* Allow to prohibit DKG changes at governance layer. * Allow test.App to broadcast RoundEvent
Diffstat (limited to 'core/utils/utils.go')
-rw-r--r--core/utils/utils.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/utils/utils.go b/core/utils/utils.go
index b8bd95e..d714068 100644
--- a/core/utils/utils.go
+++ b/core/utils/utils.go
@@ -138,3 +138,9 @@ func LaunchDummyReceiver(
func GetDKGThreshold(config *types.Config) int {
return int(config.DKGSetSize/3) + 1
}
+
+// GetNextRoundCheckpoint returns the block height to check if the next round
+// is ready.
+func GetNextRoundCheckpoint(begin, length uint64) uint64 {
+ return begin + length*9/10
+}