aboutsummaryrefslogtreecommitdiffstats
path: root/consensus/dexcon
diff options
context:
space:
mode:
authorBojie Wu <bojie@dexon.org>2018-10-09 13:28:45 +0800
committerWei-Ning Huang <w@dexon.org>2018-12-19 20:54:27 +0800
commit2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c (patch)
tree9969c7cb97a1d0b07671e0ce161e1437eb06f979 /consensus/dexcon
parent72d5692ead48a75e82182a42dd4443b2288491d2 (diff)
downloaddexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.gz
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.bz2
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.lz
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.xz
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.tar.zst
dexon-2551387414a60f2c69aa1b2fe3a7ea08a8b7fe4c.zip
app: add cache mechanism to increase performance
Diffstat (limited to 'consensus/dexcon')
-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
}