aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/interfaces.go3
-rw-r--r--core/test/governance.go5
2 files changed, 8 insertions, 0 deletions
diff --git a/core/interfaces.go b/core/interfaces.go
index 44f2308..080db20 100644
--- a/core/interfaces.go
+++ b/core/interfaces.go
@@ -84,6 +84,9 @@ type Governance interface {
// Get block proposing interval (in milliseconds).
GetBlockProposingInterval() int
+ // Get Number of Chains.
+ GetChainNumber() uint32
+
// Get Genesis CRS.
GetGenesisCRS() string
diff --git a/core/test/governance.go b/core/test/governance.go
index 681c3b5..46f8606 100644
--- a/core/test/governance.go
+++ b/core/test/governance.go
@@ -81,6 +81,11 @@ func (g *Governance) GetPhiRatio() float32 {
return 0.667
}
+// GetChainNumber returns the number of chains.
+func (g *Governance) GetChainNumber() uint32 {
+ return uint32(len(g.Validators))
+}
+
// GetConfigurationChangeEvent Get configuration change events after a certain
// epoch.
func (g *Governance) GetConfigurationChangeEvent(