aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/config
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-09-03 11:59:03 +0800
committerGitHub <noreply@github.com>2018-09-03 11:59:03 +0800
commit09393166791785ab6730b1c812b4a4fd07a92293 (patch)
tree0606f440bdd44eeac09f025de2fd4f86d48886f0 /simulation/config
parent3410f1156703a7249bade6e3cc90b60a1fcefa54 (diff)
downloaddexon-consensus-09393166791785ab6730b1c812b4a4fd07a92293.tar
dexon-consensus-09393166791785ab6730b1c812b4a4fd07a92293.tar.gz
dexon-consensus-09393166791785ab6730b1c812b4a4fd07a92293.tar.bz2
dexon-consensus-09393166791785ab6730b1c812b4a4fd07a92293.tar.lz
dexon-consensus-09393166791785ab6730b1c812b4a4fd07a92293.tar.xz
dexon-consensus-09393166791785ab6730b1c812b4a4fd07a92293.tar.zst
dexon-consensus-09393166791785ab6730b1c812b4a4fd07a92293.zip
Add GetChainNumber to Goverance (#92)
Diffstat (limited to 'simulation/config')
-rw-r--r--simulation/config/config.go23
1 files changed, 8 insertions, 15 deletions
diff --git a/simulation/config/config.go b/simulation/config/config.go
index 8a804a5..c59b663 100644
--- a/simulation/config/config.go
+++ b/simulation/config/config.go
@@ -33,17 +33,12 @@ const (
NetworkTypeTCPLocal NetworkType = "tcp-local"
)
-// Agreement settings.
-type Agreement struct {
- GenesisCRS string `toml:"genesis_crs"`
- K int
-}
-
// Consensus settings.
type Consensus struct {
- Agreement Agreement
- PhiRatio float32
- K int
+ PhiRatio float32
+ K int
+ ChainNum uint32
+ GenesisCRS string `toml:"genesis_crs"`
}
// Validator config for the simulation.
@@ -90,12 +85,10 @@ func GenerateDefault(path string) error {
Title: "DEXON Consensus Simulation Config",
Validator: Validator{
Consensus: Consensus{
- Agreement: Agreement{
- GenesisCRS: "In DEXON we trust.",
- K: 50,
- },
- PhiRatio: float32(2) / 3,
- K: 1,
+ PhiRatio: float32(2) / 3,
+ K: 1,
+ ChainNum: 7,
+ GenesisCRS: "In DEXON we trust.",
},
Num: 7,
ProposeIntervalMean: 500,