aboutsummaryrefslogtreecommitdiffstats
path: root/consensus
diff options
context:
space:
mode:
authorBojie Wu <bojie@dexon.org>2018-10-09 13:28:45 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:17 +0800
commit3f320c9048198d14bc44413861efcbc5665324b1 (patch)
treed0ae47cd428ba4fa21546efcd1ac4ab50933d600 /consensus
parente0c84599b660438d34972ceb494d36f83c26d430 (diff)
downloadgo-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.gz
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.bz2
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.lz
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.xz
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.tar.zst
go-tangerine-3f320c9048198d14bc44413861efcbc5665324b1.zip
app: add cache mechanism to increase performance
Diffstat (limited to 'consensus')
-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
}