aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/dexcon/dexcon.go
diff options
context:
space:
mode:
authorBojie Wu <bojie@dexon.org>2018-10-09 13:28:45 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:52 +0800
commit7c1386d928acd050684f435e49149696bcc0a637 (patch)
treedb7141013bd1aa9e2349aa8b161d6529ff25cd40 /consensus/dexcon/dexcon.go
parentd44a8b7003df87c7e7662a7ac86fb351872cd371 (diff)
downloaddexon-7c1386d928acd050684f435e49149696bcc0a637.tar
dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.gz
dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.bz2
dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.lz
dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.xz
dexon-7c1386d928acd050684f435e49149696bcc0a637.tar.zst
dexon-7c1386d928acd050684f435e49149696bcc0a637.zip
app: add cache mechanism to increase performance
Diffstat (limited to 'consensus/dexcon/dexcon.go')
-rw-r--r--consensus/dexcon/dexcon.go2
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
}