diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-19 16:22:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-19 16:22:55 +0800 |
commit | 8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9 (patch) | |
tree | 8977cb8cb8ba4b53fdb3dba9f8974487ad4949bd /params/gen_dexcon_config.go | |
parent | 3a0ec5eaffa6e27e241e066c10a96ef64100afc4 (diff) | |
download | dexon-8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9.tar dexon-8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9.tar.gz dexon-8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9.tar.bz2 dexon-8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9.tar.lz dexon-8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9.tar.xz dexon-8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9.tar.zst dexon-8ee0ac14165ccbb980ed5fe58c3cb5d0734634b9.zip |
core: vm: automatically calculate notary set size (#276)
Diffstat (limited to 'params/gen_dexcon_config.go')
-rw-r--r-- | params/gen_dexcon_config.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/params/gen_dexcon_config.go b/params/gen_dexcon_config.go index 38753916a..bbbf8e910 100644 --- a/params/gen_dexcon_config.go +++ b/params/gen_dexcon_config.go @@ -27,6 +27,8 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) { LambdaBA uint64 `json:"lambdaBA"` LambdaDKG uint64 `json:"lambdaDKG"` NotarySetSize uint32 `json:"notarySetSize"` + NotaryParamAlpha float32 `json:"notaryParamAlpha"` + NotaryParamBeta float32 `json:"notaryParamBeta"` DKGSetSize uint32 `json:"dkgSetSize"` RoundLength uint64 `json:"roundLength"` MinBlockInterval uint64 `json:"minBlockInterval"` @@ -45,6 +47,8 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) { enc.LambdaBA = d.LambdaBA enc.LambdaDKG = d.LambdaDKG enc.NotarySetSize = d.NotarySetSize + enc.NotaryParamAlpha = d.NotaryParamAlpha + enc.NotaryParamBeta = d.NotaryParamBeta enc.DKGSetSize = d.DKGSetSize enc.RoundLength = d.RoundLength enc.MinBlockInterval = d.MinBlockInterval @@ -72,6 +76,8 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error { LambdaBA *uint64 `json:"lambdaBA"` LambdaDKG *uint64 `json:"lambdaDKG"` NotarySetSize *uint32 `json:"notarySetSize"` + NotaryParamAlpha *float32 `json:"notaryParamAlpha"` + NotaryParamBeta *float32 `json:"notaryParamBeta"` DKGSetSize *uint32 `json:"dkgSetSize"` RoundLength *uint64 `json:"roundLength"` MinBlockInterval *uint64 `json:"minBlockInterval"` @@ -117,6 +123,12 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error { if dec.NotarySetSize != nil { d.NotarySetSize = *dec.NotarySetSize } + if dec.NotaryParamAlpha != nil { + d.NotaryParamAlpha = *dec.NotaryParamAlpha + } + if dec.NotaryParamBeta != nil { + d.NotaryParamBeta = *dec.NotaryParamBeta + } if dec.DKGSetSize != nil { d.DKGSetSize = *dec.DKGSetSize } |