diff options
Diffstat (limited to 'simulation/governance.go')
-rw-r--r-- | simulation/governance.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/simulation/governance.go b/simulation/governance.go index 44f679d..79c9119 100644 --- a/simulation/governance.go +++ b/simulation/governance.go @@ -20,6 +20,7 @@ package simulation import ( "fmt" "sync" + "time" "github.com/dexon-foundation/dexon-consensus-core/core/types" "github.com/dexon-foundation/dexon-consensus-core/simulation/config" @@ -38,6 +39,7 @@ type simGovernance struct { crs string dkgComplaint map[uint64][]*types.DKGComplaint dkgMasterPublicKey map[uint64][]*types.DKGMasterPublicKey + lambda time.Duration } // newSimGovernance returns a new simGovernance instance. @@ -52,6 +54,7 @@ func newSimGovernance( crs: consensusConfig.GenesisCRS, dkgComplaint: make(map[uint64][]*types.DKGComplaint), dkgMasterPublicKey: make(map[uint64][]*types.DKGMasterPublicKey), + lambda: time.Duration(consensusConfig.Lambda) * time.Millisecond, } } @@ -107,6 +110,11 @@ func (g *simGovernance) GetGenesisCRS() string { return g.crs } +// GetLambda return lambda for BA. +func (g *simGovernance) GetLambda() time.Duration { + return g.lambda +} + // addValidator add a new validator into the simulated governance contract. func (g *simGovernance) addValidator(vID types.ValidatorID) { g.lock.Lock() |