diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-07-30 09:05:58 +0800 |
---|---|---|
committer | Wei-Ning Huang <aitjcize@gmail.com> | 2018-07-30 09:05:58 +0800 |
commit | 279daea6e004ab6ad9d079ccc35b7c52d79630ad (patch) | |
tree | 6e07c9ddf5608339c216c4657250f7df238bd75e /simulation/config | |
parent | 568ce1f526d10184af2ccfe342394f57ae689a14 (diff) | |
download | dexon-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar dexon-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.gz dexon-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.bz2 dexon-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.lz dexon-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.xz dexon-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.zst dexon-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.zip |
Add a config that PeerServer can shutdown after receiving enough of block. (#19)
Diffstat (limited to 'simulation/config')
-rw-r--r-- | simulation/config/config.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/simulation/config/config.go b/simulation/config/config.go index 30d1562..c704a8d 100644 --- a/simulation/config/config.go +++ b/simulation/config/config.go @@ -18,6 +18,7 @@ package config import ( + "math" "os" "github.com/naoina/toml" @@ -38,6 +39,7 @@ type Validator struct { Num int ProposeIntervalMean float64 ProposeIntervalSigma float64 + MaxBlock uint64 } // Networking config. @@ -71,6 +73,7 @@ func GenerateDefault(path string) error { Num: 7, ProposeIntervalMean: 500, ProposeIntervalSigma: 30, + MaxBlock: math.MaxUint64, }, Networking: Networking{ Type: NetworkTypeFake, |