diff options
author | Bojie Wu <bojie@dexon.org> | 2018-10-09 13:28:45 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:52 +0800 |
commit | 7c1386d928acd050684f435e49149696bcc0a637 (patch) | |
tree | db7141013bd1aa9e2349aa8b161d6529ff25cd40 /consensus/dexcon | |
parent | d44a8b7003df87c7e7662a7ac86fb351872cd371 (diff) | |
download | dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.gz dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.zst dexon-7c1386d928acd050684f435e49149696bcc0a637.zip |
app: add cache mechanism to increase performance
Diffstat (limited to 'consensus/dexcon')
-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 } |