cmd, core, eth, miner, params: configurable gas floor and ceil

This commit is contained in:
Péter Szilágyi
2018-08-29 12:21:12 +03:00
parent c1c003e4ff
commit e8f229b82e
20 changed files with 88 additions and 49 deletions

View File

@ -52,13 +52,13 @@ type Miner struct {
shouldStart int32 // should start indicates whether we should start after sync
}
func New(eth Backend, config *params.ChainConfig, mux *event.TypeMux, engine consensus.Engine, recommit time.Duration) *Miner {
func New(eth Backend, config *params.ChainConfig, mux *event.TypeMux, engine consensus.Engine, recommit time.Duration, gasFloor, gasCeil uint64) *Miner {
miner := &Miner{
eth: eth,
mux: mux,
engine: engine,
exitCh: make(chan struct{}),
worker: newWorker(config, engine, eth, mux, recommit),
worker: newWorker(config, engine, eth, mux, recommit, gasFloor, gasCeil),
canStart: 1,
}
go miner.update()