diff options
-rw-r--r-- | consensus/dexcon/dexcon.go | 2 | ||||
-rw-r--r-- | dex/backend.go | 2 | ||||
-rw-r--r-- | params/config.go | 7 |
3 files changed, 6 insertions, 5 deletions
diff --git a/consensus/dexcon/dexcon.go b/consensus/dexcon/dexcon.go index c3d42d599..c18e3cc6a 100644 --- a/consensus/dexcon/dexcon.go +++ b/consensus/dexcon/dexcon.go @@ -99,7 +99,7 @@ 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) { - reward := new(big.Int).Div(d.config.MiningReward, new(big.Int).SetUint64(uint64(d.config.NumChains))) + reward := new(big.Int).Div(d.config.BlockReward, new(big.Int).SetUint64(uint64(d.config.NumChains))) state.AddBalance(header.Coinbase, reward) header.Root = state.IntermediateRoot(chain.Config().IsEIP158(header.Number)) diff --git a/dex/backend.go b/dex/backend.go index a9af65951..bb524f171 100644 --- a/dex/backend.go +++ b/dex/backend.go @@ -119,7 +119,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) { bloomRequests: make(chan chan *bloombits.Retrieval), bloomIndexer: NewBloomIndexer(chainDb, params.BloomBitsBlocks, params.BloomConfirms), blockdb: db, - engine: dexcon.New(¶ms.DexconConfig{}), + engine: dexcon.New(chainConfig.Dexcon), } var ( diff --git a/params/config.go b/params/config.go index bd4e254a2..27368541a 100644 --- a/params/config.go +++ b/params/config.go @@ -78,8 +78,9 @@ var ( ByzantiumBlock: big.NewInt(0), ConstantinopleBlock: big.NewInt(0), PetersburgBlock: big.NewInt(0), - Ethash: new(EthashConfig), - Dexcon: &DexconConfig{}, + Dexcon: &DexconConfig{ + BlockReward: new(big.Int).SetInt64(5e+18), + }, } // TestnetTrustedCheckpoint contains the light client trusted checkpoint for the Ropsten test network. @@ -239,7 +240,7 @@ type DexconConfig struct { RoundInterval uint64 `json:"roundInterval"` MinBlockInterval uint64 `json:"minBlockInterval"` MaxBlockInterval uint64 `json:"maxBlockInterval"` - MiningReward *big.Int `json:"miningReward"` + BlockReward *big.Int `json:"blockReward"` } // String implements the stringer interface, returning the consensus engine details. |