From 279daea6e004ab6ad9d079ccc35b7c52d79630ad Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Mon, 30 Jul 2018 09:05:58 +0800 Subject: Add a config that PeerServer can shutdown after receiving enough of block. (#19) --- simulation/config/config.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'simulation/config') 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, -- cgit v1.2.3