diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-09 13:28:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 84d04454db640bc730445be3ec536d4100ae6ec1 (patch) | |
tree | 9e23acdd738c9de4f5fb8b800187932b501476ee /consensus | |
parent | 947a2b720d966efae8aa8564cbe948f8eb6d5d38 (diff) | |
download | dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.gz dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.bz2 dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.lz dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.xz dexon-84d04454db640bc730445be3ec536d4100ae6ec1.tar.zst dexon-84d04454db640bc730445be3ec536d4100ae6ec1.zip |
app: add cache mechanism to increase performance
Diffstat (limited to 'consensus')
-rw-r--r-- | consensus/dexcon/dexcon.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/consensus/dexcon/dexcon.go b/consensus/dexcon/dexcon.go index d8c181432..67bf33bbf 100644 --- a/consensus/dexcon/dexcon.go +++ b/consensus/dexcon/dexcon.go @@ -113,6 +113,8 @@ func (d *Dexcon) Finalize(chain consensus.ChainReader, header *types.Header, sta config := d.configFetcher.DexconConfiguration(header.Round) reward := new(big.Int).Div(config.BlockReward, big.NewInt(int64(config.NumChains))) state.AddBalance(header.Coinbase, reward) + + header.BlockReward = reward header.Root = state.IntermediateRoot(true) return types.NewBlock(header, txs, uncles, receipts), nil } |