aboutsummaryrefslogtreecommitdiffstats
path: root/simulation
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-08-29 10:55:23 +0800
committerGitHub <noreply@github.com>2018-08-29 10:55:23 +0800
commit7b804a5950981324e683085cbbcfee5fa9162f6f (patch)
tree19ddd386ba7473bf9d16c008021d1fb244cab116 /simulation
parent7e9d2db5576d697b578669c935b2e7bbf9422ec7 (diff)
downloaddexon-consensus-7b804a5950981324e683085cbbcfee5fa9162f6f.tar
dexon-consensus-7b804a5950981324e683085cbbcfee5fa9162f6f.tar.gz
dexon-consensus-7b804a5950981324e683085cbbcfee5fa9162f6f.tar.bz2
dexon-consensus-7b804a5950981324e683085cbbcfee5fa9162f6f.tar.lz
dexon-consensus-7b804a5950981324e683085cbbcfee5fa9162f6f.tar.xz
dexon-consensus-7b804a5950981324e683085cbbcfee5fa9162f6f.tar.zst
dexon-consensus-7b804a5950981324e683085cbbcfee5fa9162f6f.zip
core: Add agreement module (#77)
Diffstat (limited to 'simulation')
-rw-r--r--simulation/config/config.go15
1 files changed, 13 insertions, 2 deletions
diff --git a/simulation/config/config.go b/simulation/config/config.go
index 0c6b5d3..6ead62e 100644
--- a/simulation/config/config.go
+++ b/simulation/config/config.go
@@ -33,10 +33,17 @@ const (
NetworkTypeTCPLocal NetworkType = "tcp-local"
)
+// Agreement settings.
+type Agreement struct {
+ CRS string
+ K int
+}
+
// Consensus settings.
type Consensus struct {
- PhiRatio float32
- K int
+ Agreement Agreement
+ PhiRatio float32
+ K int
}
// Validator config for the simulation.
@@ -83,6 +90,10 @@ func GenerateDefault(path string) error {
Title: "DEXON Consensus Simulation Config",
Validator: Validator{
Consensus: Consensus{
+ Agreement: Agreement{
+ CRS: "In DEXON we trust.",
+ K: 50,
+ },
PhiRatio: float32(2) / 3,
K: 1,
},