diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-19 16:22:55 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:58 +0800 |
commit | 625bdb6b3ecdd5bed3adb4cd1f8fc0e56ae1f49f (patch) | |
tree | e376057c9fc6d5f5355ccc5d6976c529bb69fde7 /params/gen_dexcon_config.go | |
parent | 4ae37d25a2bd79fa98a5e7845342b98133d2cc6f (diff) | |
download | dexon-625bdb6b3ecdd5bed3adb4cd1f8fc0e56ae1f49f.tar.gz dexon-625bdb6b3ecdd5bed3adb4cd1f8fc0e56ae1f49f.tar.zst dexon-625bdb6b3ecdd5bed3adb4cd1f8fc0e56ae1f49f.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 } |