aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/config
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-07-30 09:05:58 +0800
committerWei-Ning Huang <aitjcize@gmail.com>2018-07-30 09:05:58 +0800
commit279daea6e004ab6ad9d079ccc35b7c52d79630ad (patch)
tree6e07c9ddf5608339c216c4657250f7df238bd75e /simulation/config
parent568ce1f526d10184af2ccfe342394f57ae689a14 (diff)
downloadtangerine-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar
tangerine-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.gz
tangerine-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.bz2
tangerine-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.lz
tangerine-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.xz
tangerine-consensus-279daea6e004ab6ad9d079ccc35b7c52d79630ad.tar.zst
tangerine-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.go3
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,