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 /consensus | |
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 'consensus')
-rw-r--r-- | consensus/dexcon/dexcon.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/consensus/dexcon/dexcon.go b/consensus/dexcon/dexcon.go index f7857c070..46090b757 100644 --- a/consensus/dexcon/dexcon.go +++ b/consensus/dexcon/dexcon.go @@ -106,8 +106,7 @@ func (d *Dexcon) Prepare(chain consensus.ChainReader, header *types.Header) erro // rewards given, and returns the final block. func (d *Dexcon) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) { // TODO(Bojie): remove it and get value from config - blockReward := big.NewInt(1e+18) - reward := new(big.Int).Div(blockReward, new(big.Int).SetUint64(uint64(d.config.NumChains))) + reward := new(big.Int).Div(d.config.BlockReward, new(big.Int).SetUint64(uint64(d.config.NumChains))) state.AddBalance(header.Coinbase, reward) header.Root = state.IntermediateRoot(true) |