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
commitc03b1bb0f80cb1b2b2b2a1bd510b155462db2949 (patch)
tree0436070daf2ca03662bb816494c95e23be6791b2 /consensus/dexcon
parentc5f6fcac5a290d07527c22f287b1541832b1aa73 (diff)
downloaddexon-c03b1bb0f80cb1b2b2b2a1bd510b155462db2949.tar
dexon-c03b1bb0f80cb1b2b2b2a1bd510b155462db2949.tar.gz
dexon-c03b1bb0f80cb1b2b2b2a1bd510b155462db2949.tar.bz2
dexon-c03b1bb0f80cb1b2b2b2a1bd510b155462db2949.tar.lz
dexon-c03b1bb0f80cb1b2b2b2a1bd510b155462db2949.tar.xz
dexon-c03b1bb0f80cb1b2b2b2a1bd510b155462db2949.tar.zst
dexon-c03b1bb0f80cb1b2b2b2a1bd510b155462db2949.zip
app: implement new insert blocks logic
Diffstat (limited to 'consensus/dexcon')
-rw-r--r--consensus/dexcon/dexcon.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/consensus/dexcon/dexcon.go b/consensus/dexcon/dexcon.go
index 4017637b0..f7857c070 100644
--- a/consensus/dexcon/dexcon.go
+++ b/consensus/dexcon/dexcon.go
@@ -105,7 +105,8 @@ func (d *Dexcon) Prepare(chain consensus.ChainReader, header *types.Header) erro
// Finalize implements consensus.Engine, ensuring no uncles are set, nor block
// rewards given, and returns the final block.
func (d *Dexcon) Finalize(chain consensus.ChainReader, header *types.Header, state *state.StateDB, txs []*types.Transaction, uncles []*types.Header, receipts []*types.Receipt) (*types.Block, error) {
- blockReward := big.NewInt(100000000000)
+ // TODO(Bojie): remove it and get value from config
+ blockReward := big.NewInt(1e+18)
reward := new(big.Int).Div(blockReward, new(big.Int).SetUint64(uint64(d.config.NumChains)))
state.AddBalance(header.Coinbase, reward)
header.Root = state.IntermediateRoot(true)