diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-02-26 11:21:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-26 11:21:28 +0800 |
commit | fc8aae4eb1608ce574f853a1b1ecd60014886882 (patch) | |
tree | 8439c65d140393e7d43c9003a64ac9bda9298149 /simulation | |
parent | 929d41761b72abab106b5a4d627701d1c232e891 (diff) | |
download | dexon-consensus-fc8aae4eb1608ce574f853a1b1ecd60014886882.tar dexon-consensus-fc8aae4eb1608ce574f853a1b1ecd60014886882.tar.gz dexon-consensus-fc8aae4eb1608ce574f853a1b1ecd60014886882.tar.bz2 dexon-consensus-fc8aae4eb1608ce574f853a1b1ecd60014886882.tar.lz dexon-consensus-fc8aae4eb1608ce574f853a1b1ecd60014886882.tar.xz dexon-consensus-fc8aae4eb1608ce574f853a1b1ecd60014886882.tar.zst dexon-consensus-fc8aae4eb1608ce574f853a1b1ecd60014886882.zip |
core: Change RoundInterval to RoundLength (#453)
Diffstat (limited to 'simulation')
-rw-r--r-- | simulation/config/config.go | 4 | ||||
-rw-r--r-- | simulation/config/utils.go | 4 | ||||
-rw-r--r-- | simulation/node.go | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/simulation/config/config.go b/simulation/config/config.go index 0ee2109..d47431a 100644 --- a/simulation/config/config.go +++ b/simulation/config/config.go @@ -32,7 +32,7 @@ type Consensus struct { GenesisCRS string `toml:"genesis_crs"` LambdaBA int `toml:"lambda_ba"` LambdaDKG int `toml:"lambda_dkg"` - RoundInterval int + RoundLength int NotarySetSize uint32 DKGSetSize uint32 `toml:"dkg_set_size"` MinBlockInterval int @@ -114,7 +114,7 @@ func GenerateDefault(path string) error { GenesisCRS: "In DEXON we trust.", LambdaBA: 250, LambdaDKG: 1000, - RoundInterval: 1000, + RoundLength: 1000, NotarySetSize: 7, DKGSetSize: 7, MinBlockInterval: 750, diff --git a/simulation/config/utils.go b/simulation/config/utils.go index f8f1eec..6e9024a 100644 --- a/simulation/config/utils.go +++ b/simulation/config/utils.go @@ -32,7 +32,7 @@ func StateChangeTypeFromString(s string) test.StateChangeType { case "lambda_dkg": return test.StateChangeLambdaDKG case "round_interval": - return test.StateChangeRoundInterval + return test.StateChangeRoundLength case "min_block_interval": return test.StateChangeMinBlockInterval case "notary_set_size": @@ -55,7 +55,7 @@ func StateChangeValueFromString( } return uint32(ret) case test.StateChangeLambdaBA, test.StateChangeLambdaDKG, - test.StateChangeRoundInterval, test.StateChangeMinBlockInterval: + test.StateChangeRoundLength, test.StateChangeMinBlockInterval: ret, err := strconv.ParseInt(v, 10, 32) if err != nil { panic(err) diff --git a/simulation/node.go b/simulation/node.go index 7688c25..758f980 100644 --- a/simulation/node.go +++ b/simulation/node.go @@ -211,7 +211,7 @@ func (n *node) prepareConfigs() { cConfig.LambdaBA)*time.Millisecond) // #nosec G104 n.gov.State().RequestChange(test.StateChangeLambdaDKG, time.Duration( cConfig.LambdaDKG)*time.Millisecond) // #nosec G104 - n.gov.State().RequestChange(test.StateChangeRoundInterval, cConfig.RoundInterval) // #nosec G104 + n.gov.State().RequestChange(test.StateChangeRoundLength, cConfig.RoundLength) // #nosec G104 n.gov.State().RequestChange(test.StateChangeMinBlockInterval, time.Duration( cConfig.MinBlockInterval)*time.Millisecond) // #nosec G104 n.gov.State().ProposeCRS(0, crypto.Keccak256Hash([]byte(cConfig.GenesisCRS))) // #nosec G104 |