diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-11 17:04:08 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:23:38 +0800 |
commit | 1e3c995c15756c87589ba2fe531f1af9d23f1c75 (patch) | |
tree | 75cc0a1ee0296b5afbf6a233dd84b2e8bec33164 /params | |
parent | 2b5dfb450ce6bcbbf85d46a8c87d8e20683c646d (diff) | |
download | go-tangerine-1e3c995c15756c87589ba2fe531f1af9d23f1c75.tar go-tangerine-1e3c995c15756c87589ba2fe531f1af9d23f1c75.tar.gz go-tangerine-1e3c995c15756c87589ba2fe531f1af9d23f1c75.tar.bz2 go-tangerine-1e3c995c15756c87589ba2fe531f1af9d23f1c75.tar.lz go-tangerine-1e3c995c15756c87589ba2fe531f1af9d23f1c75.tar.xz go-tangerine-1e3c995c15756c87589ba2fe531f1af9d23f1c75.tar.zst go-tangerine-1e3c995c15756c87589ba2fe531f1af9d23f1c75.zip |
core: populate dexon configuration in SetupGenesisBlock
Diffstat (limited to 'params')
-rw-r--r-- | params/config.go | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/params/config.go b/params/config.go index 564b0bd5e..1b3b39b29 100644 --- a/params/config.go +++ b/params/config.go @@ -54,7 +54,7 @@ var ( ByzantiumBlock: big.NewInt(4370000), ConstantinopleBlock: big.NewInt(7280000), PetersburgBlock: big.NewInt(7280000), - Ethash: new(EthashConfig), + Dexcon: &DexconConfig{}, } // MainnetTrustedCheckpoint contains the light client trusted checkpoint for the main network. @@ -228,12 +228,32 @@ func (c *CliqueConfig) String() string { // DexconConfig is the consensus engine configs for DEXON consensus. type DexconConfig struct { - GovernanceContractAddress string + NumChains uint32 `json:"numChains"` + LambdaBA uint64 `json:"lambdaBA"` + LambdaDKG uint64 `json:"lambdaDKG"` + K int `json:"k"` + PhiRatio float32 `json:"phiRatio"` + NotarySetSize uint32 `json:"notarySetSize"` + DKGSetSize uint32 `json:"dkgSetSize"` + RoundInterval uint64 `json:"roundInterval"` + MinBlockInterval uint64 `json:"minBlockInterval"` + MaxBlockInterval uint64 `json:"maxBlockInterval"` } // String implements the stringer interface, returning the consensus engine details. -func (c *DexconConfig) String() string { - return "dexcon" +func (d *DexconConfig) String() string { + return fmt.Sprintf("{NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v MaxBlockInterval: %v", + d.NumChains, + d.LambdaBA, + d.LambdaDKG, + d.K, + d.PhiRatio, + d.NotarySetSize, + d.DKGSetSize, + d.RoundInterval, + d.MinBlockInterval, + d.MaxBlockInterval, + ) } // String implements the fmt.Stringer interface. |