aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/governance.go
diff options
context:
space:
mode:
Diffstat (limited to 'simulation/governance.go')
-rw-r--r--simulation/governance.go18
1 files changed, 16 insertions, 2 deletions
diff --git a/simulation/governance.go b/simulation/governance.go
index 7e3f6f2..7100d4c 100644
--- a/simulation/governance.go
+++ b/simulation/governance.go
@@ -34,6 +34,8 @@ type simGovernance struct {
expectedNumValidators int
k int
phiRatio float32
+ crs string
+ agreementK int
}
// newSimGovernance returns a new simGovernance instance.
@@ -42,8 +44,10 @@ func newSimGovernance(
return &simGovernance{
validatorSet: make(map[types.ValidatorID]decimal.Decimal),
expectedNumValidators: numValidators,
- k: consensusConfig.K,
- phiRatio: consensusConfig.PhiRatio,
+ k: consensusConfig.K,
+ phiRatio: consensusConfig.PhiRatio,
+ crs: consensusConfig.Agreement.GenesisCRS,
+ agreementK: consensusConfig.Agreement.K,
}
}
@@ -84,6 +88,16 @@ func (g *simGovernance) GetConfigurationChangeEvent(
return nil
}
+// GetGenesisCRS returns CRS.
+func (g *simGovernance) GetGenesisCRS() string {
+ return g.crs
+}
+
+// GetAgreementK returns K for agreement.
+func (g *simGovernance) GetAgreementK() int {
+ return g.agreementK
+}
+
// addValidator add a new validator into the simulated governance contract.
func (g *simGovernance) addValidator(vID types.ValidatorID) {
g.lock.Lock()