diff options
author | gary rong <garyrong0905@gmail.com> | 2018-08-22 03:56:54 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-08-22 03:56:54 +0800 |
commit | b2c644ffb5c283a171ddf3889693673939917541 (patch) | |
tree | 501d3c337f5fb59404fd8d530eb247cdcc2144eb /eth/backend.go | |
parent | 522cfc68ff496aee4205add982db049dc3092024 (diff) | |
download | dexon-b2c644ffb5c283a171ddf3889693673939917541.tar.gz dexon-b2c644ffb5c283a171ddf3889693673939917541.tar.zst dexon-b2c644ffb5c283a171ddf3889693673939917541.zip |
cmd, eth, miner: make recommit configurable (#17444)
* cmd, eth, miner: make recommit configurable
* cmd, eth, les, miner: polish a bit
* miner: filter duplicate sealing work
* cmd: remove uncessary conversion
* miner: avoid microptimization in favor of cleaner code
Diffstat (limited to 'eth/backend.go')
-rw-r--r-- | eth/backend.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eth/backend.go b/eth/backend.go index 588b78256..648175acf 100644 --- a/eth/backend.go +++ b/eth/backend.go @@ -127,7 +127,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { engine: CreateConsensusEngine(ctx, chainConfig, &config.Ethash, config.MinerNotify, chainDb), shutdownChan: make(chan bool), networkID: config.NetworkId, - gasPrice: config.GasPrice, + gasPrice: config.MinerGasPrice, etherbase: config.Etherbase, bloomRequests: make(chan chan *bloombits.Retrieval), bloomIndexer: NewBloomIndexer(chainDb, params.BloomBitsBlocks, bloomConfirms), @@ -167,13 +167,13 @@ func New(ctx *node.ServiceContext, config *Config) (*Ethereum, error) { return nil, err } - eth.miner = miner.New(eth, eth.chainConfig, eth.EventMux(), eth.engine) - eth.miner.SetExtra(makeExtraData(config.ExtraData)) + eth.miner = miner.New(eth, eth.chainConfig, eth.EventMux(), eth.engine, config.MinerRecommit) + eth.miner.SetExtra(makeExtraData(config.MinerExtraData)) eth.APIBackend = &EthAPIBackend{eth, nil} gpoParams := config.GPO if gpoParams.Default == nil { - gpoParams.Default = config.GasPrice + gpoParams.Default = config.MinerGasPrice } eth.APIBackend.gpo = gasprice.NewOracle(eth.APIBackend, gpoParams) |