diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-10-18 21:22:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:23:39 +0800 |
commit | da5366ade13a7e92a710db139cac423b8dea21d6 (patch) | |
tree | d970974b40207a41ddee18e34af8ca90d56a7c2b /params/config.go | |
parent | b0fd5da490e5141ca456f145a1fd1e7a55b33e1f (diff) | |
download | go-tangerine-da5366ade13a7e92a710db139cac423b8dea21d6.tar go-tangerine-da5366ade13a7e92a710db139cac423b8dea21d6.tar.gz go-tangerine-da5366ade13a7e92a710db139cac423b8dea21d6.tar.bz2 go-tangerine-da5366ade13a7e92a710db139cac423b8dea21d6.tar.lz go-tangerine-da5366ade13a7e92a710db139cac423b8dea21d6.tar.xz go-tangerine-da5366ade13a7e92a710db139cac423b8dea21d6.tar.zst go-tangerine-da5366ade13a7e92a710db139cac423b8dea21d6.zip |
params: load blockReward from genesis JSON file
Diffstat (limited to 'params/config.go')
-rw-r--r-- | params/config.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/params/config.go b/params/config.go index fc02c3aa3..fdf716661 100644 --- a/params/config.go +++ b/params/config.go @@ -21,6 +21,7 @@ import ( "math/big" "github.com/dexon-foundation/dexon/common" + "github.com/dexon-foundation/dexon/common/math" ) // Genesis hashes to enforce below configs on. @@ -227,6 +228,8 @@ func (c *CliqueConfig) String() string { return "clique" } +//go:generate gencodec -type DexconConfig -field-override dexconConfigSpecMarshaling -out gen_dexcon_config.go + // DexconConfig is the consensus engine configs for DEXON consensus. type DexconConfig struct { GenesisCRSText string `json:"genesisCRSText"` @@ -243,6 +246,10 @@ type DexconConfig struct { BlockReward *big.Int `json:"blockReward"` } +type dexconConfigSpecMarshaling struct { + BlockReward *math.HexOrDecimal256 +} + // String implements the stringer interface, returning the consensus engine details. func (d *DexconConfig) String() string { return fmt.Sprintf("{GenesisCRSText: %v NumChains: %v LambdaBA: %v LambdaDKG: %v K: %v PhiRatio: %v NotarySetSize: %v DKGSetSize: %v RoundInterval: %v MinBlockInterval: %v MaxBlockInterval: %v BlockReward: %v", |