diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-16 18:17:51 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:18 +0800 |
commit | 10697136e876446a2807d9fd4799a0a5b9605e30 (patch) | |
tree | ef20521eccc0addde3c377715a08ea8c110ade1a /params | |
parent | fd188f89845ea16c40c2b6af2ffa67b0f445b854 (diff) | |
download | go-tangerine-10697136e876446a2807d9fd4799a0a5b9605e30.tar go-tangerine-10697136e876446a2807d9fd4799a0a5b9605e30.tar.gz go-tangerine-10697136e876446a2807d9fd4799a0a5b9605e30.tar.bz2 go-tangerine-10697136e876446a2807d9fd4799a0a5b9605e30.tar.lz go-tangerine-10697136e876446a2807d9fd4799a0a5b9605e30.tar.xz go-tangerine-10697136e876446a2807d9fd4799a0a5b9605e30.tar.zst go-tangerine-10697136e876446a2807d9fd4799a0a5b9605e30.zip |
core: vm: add minStake to governance contract variable (#31)
Diffstat (limited to 'params')
-rw-r--r-- | params/config.go | 7 | ||||
-rw-r--r-- | params/gen_dexcon_config.go | 6 |
2 files changed, 12 insertions, 1 deletions
diff --git a/params/config.go b/params/config.go index d66ee5610..4dbbf6233 100644 --- a/params/config.go +++ b/params/config.go @@ -54,6 +54,7 @@ var ( Dexcon: &DexconConfig{ GenesisCRSText: "In DEXON, we trust.", Owner: common.HexToAddress("BF8C48A620bacc46907f9B89732D25E47A2D7Cf7"), + MinStake: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)), BlockReward: big.NewInt(1e18), BlockGasLimit: 80000000, NumChains: 4, @@ -92,6 +93,7 @@ var ( Dexcon: &DexconConfig{ GenesisCRSText: "In DEXON, we trust.", Owner: common.HexToAddress("BF8C48A620bacc46907f9B89732D25E47A2D7Cf7"), + MinStake: new(big.Int).Mul(big.NewInt(1e18), big.NewInt(1e5)), BlockReward: big.NewInt(1e18), BlockGasLimit: 80000000, NumChains: 6, @@ -201,6 +203,7 @@ func (c *CliqueConfig) String() string { type DexconConfig struct { GenesisCRSText string `json:"genesisCRSText"` Owner common.Address `json:"owner"` + MinStake *big.Int `json:"minStake"` BlockReward *big.Int `json:"blockReward"` BlockGasLimit uint64 `json:"blockGasLimit"` NumChains uint32 `json:"numChains"` @@ -215,14 +218,16 @@ type DexconConfig struct { } type dexconConfigSpecMarshaling struct { + MinStake *math.HexOrDecimal256 BlockReward *math.HexOrDecimal256 } // String implements the stringer interface, returning the consensus engine details. func (d *DexconConfig) String() string { - return fmt.Sprintf("{GenesisCRSText: %v Owner: %v BlockReward: %v BlockGasLimit: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v}", + return fmt.Sprintf("{GenesisCRSText: %v Owner: %v MinStake: %v BlockReward: %v BlockGasLimit: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v}", d.GenesisCRSText, d.Owner, + d.MinStake, d.BlockReward, d.BlockGasLimit, d.NumChains, diff --git a/params/gen_dexcon_config.go b/params/gen_dexcon_config.go index e1be574c0..6633b38f3 100644 --- a/params/gen_dexcon_config.go +++ b/params/gen_dexcon_config.go @@ -17,6 +17,7 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) { type DexconConfig struct { GenesisCRSText string `json:"genesisCRSText"` Owner common.Address `json:"owner"` + MinStake *math.HexOrDecimal256 `json:"minStake"` BlockReward *math.HexOrDecimal256 `json:"blockReward"` BlockGasLimit uint64 `json:"blockGasLimit"` NumChains uint32 `json:"numChains"` @@ -32,6 +33,7 @@ func (d DexconConfig) MarshalJSON() ([]byte, error) { var enc DexconConfig enc.GenesisCRSText = d.GenesisCRSText enc.Owner = d.Owner + enc.MinStake = (*math.HexOrDecimal256)(d.MinStake) enc.BlockReward = (*math.HexOrDecimal256)(d.BlockReward) enc.BlockGasLimit = d.BlockGasLimit enc.NumChains = d.NumChains @@ -51,6 +53,7 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error { type DexconConfig struct { GenesisCRSText *string `json:"genesisCRSText"` Owner *common.Address `json:"owner"` + MinStake *math.HexOrDecimal256 `json:"minStake"` BlockReward *math.HexOrDecimal256 `json:"blockReward"` BlockGasLimit *uint64 `json:"blockGasLimit"` NumChains *uint32 `json:"numChains"` @@ -73,6 +76,9 @@ func (d *DexconConfig) UnmarshalJSON(input []byte) error { if dec.Owner != nil { d.Owner = *dec.Owner } + if dec.MinStake != nil { + d.MinStake = (*big.Int)(dec.MinStake) + } if dec.BlockReward != nil { d.BlockReward = (*big.Int)(dec.BlockReward) } |