diff --git a/miner/miner.go b/miner/miner.go index b968b3a92a..22c75b6e1a 100644 --- a/miner/miner.go +++ b/miner/miner.go @@ -71,7 +71,7 @@ func New(eth Backend, config *Config, chainConfig *params.ChainConfig, mux *even eth: eth, mux: mux, engine: engine, - exitCh: make(chan struct{}), + exitCh: make(chan struct{}, 1), worker: newWorker(config, chainConfig, engine, eth, mux, isLocalBlock, true), canStart: 1, } diff --git a/miner/worker.go b/miner/worker.go index 59a47a1220..01e6476125 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -198,7 +198,7 @@ func newWorker(config *Config, chainConfig *params.ChainConfig, engine consensus newWorkCh: make(chan *newWorkReq), taskCh: make(chan *task), resultCh: make(chan *types.Block, resultQueueSize), - exitCh: make(chan struct{}), + exitCh: make(chan struct{}, 1), startCh: make(chan struct{}, 1), resubmitIntervalCh: make(chan time.Duration), resubmitAdjustCh: make(chan *intervalAdjust, resubmitAdjustChanSize),