diff options
Diffstat (limited to 'core/governance.go')
-rw-r--r-- | core/governance.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/core/governance.go b/core/governance.go index 39b2704e6..277b3bb89 100644 --- a/core/governance.go +++ b/core/governance.go @@ -310,6 +310,15 @@ func (g *Governance) IsDKGFinal(round uint64) bool { return count >= threshold } +func (g *Governance) IsDKGSuccess(round uint64) bool { + s := g.GetStateForDKGAtRound(round) + if s == nil { + return false + } + return s.DKGSuccessesCount().Uint64() >= + uint64(coreUtils.GetDKGValidThreshold(g.Configuration(round))) +} + func (g *Governance) MinGasPrice(round uint64) *big.Int { return g.GetStateForConfigAtRound(round).MinGasPrice() } |