aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go
diff options
context:
space:
mode:
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.go11
1 files changed, 11 insertions, 0 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 6b9ce634f..9159be858 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/utils.go
@@ -159,3 +159,14 @@ func DiffUint64(a, b uint64) uint64 {
}
return b - a
}
+
+// notifyGenesisRounds notifies governance to generate configs based on genesis
+// state.
+func notifyGenesisRounds(initBlock *types.Block, gov Governance) {
+ if initBlock.Position.Round != 0 || !initBlock.IsGenesis() {
+ return
+ }
+ for round := uint64(0); round < roundShift; round++ {
+ gov.NotifyRoundHeight(round, 0)
+ }
+}