aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/governance.go
diff options
context:
space:
mode:
Diffstat (limited to 'simulation/governance.go')
-rw-r--r--simulation/governance.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/simulation/governance.go b/simulation/governance.go
index a48e221..eb0f2a2 100644
--- a/simulation/governance.go
+++ b/simulation/governance.go
@@ -70,8 +70,8 @@ func (g *simGovernance) setNetwork(network *network) {
g.network = network
}
-// GetNotarySet returns the current notary set.
-func (g *simGovernance) GetNotarySet(
+// GetNodeSet returns the current notary set.
+func (g *simGovernance) GetNodeSet(
blockHeight uint64) map[types.NodeID]struct{} {
g.lock.RLock()
defer g.lock.RUnlock()
@@ -84,12 +84,11 @@ func (g *simGovernance) GetNotarySet(
return ret
}
-// GetConfiguration returns the configuration at a given block height.
-func (g *simGovernance) GetConfiguration(blockHeight uint64) *types.Config {
+// GetConfiguration returns the configuration at a given round.
+func (g *simGovernance) GetConfiguration(round uint64) *types.Config {
return &types.Config{
NumShards: 1,
NumChains: g.chainNum,
- CRS: g.crs,
LambdaBA: g.lambdaBA,
LambdaDKG: g.lambdaDKG,
K: g.k,
@@ -97,6 +96,11 @@ func (g *simGovernance) GetConfiguration(blockHeight uint64) *types.Config {
}
}
+// GetCRS returns the CRS for a given round.
+func (g *simGovernance) GetCRS(round uint64) []byte {
+ return g.crs
+}
+
// addNode add a new node into the simulated governance contract.
func (g *simGovernance) addNode(nID types.NodeID) {
g.lock.Lock()