diff options
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/ticker.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/ticker.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/ticker.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/ticker.go index 3728a79e6..f8d0c67d9 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/ticker.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/ticker.go @@ -17,7 +17,11 @@ package core -import "time" +import ( + "time" + + "github.com/dexon-foundation/dexon-consensus/core/utils" +) // TickerType is the type of ticker. type TickerType int @@ -65,11 +69,11 @@ func newTicker(gov Governance, round uint64, tickerType TickerType) (t Ticker) { var duration time.Duration switch tickerType { case TickerBA: - duration = gov.Configuration(round).LambdaBA + duration = utils.GetConfigWithPanic(gov, round, nil).LambdaBA case TickerDKG: - duration = gov.Configuration(round).LambdaDKG + duration = utils.GetConfigWithPanic(gov, round, nil).LambdaDKG case TickerCRS: - duration = gov.Configuration(round).RoundInterval / 2 + duration = utils.GetConfigWithPanic(gov, round, nil).RoundInterval / 2 } t = newDefaultTicker(duration) } |