mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 12:07:17 +00:00
eth, cmd/geth: start mining from console respects CLI flag
This commit is contained in:
parent
d3e84cc8b4
commit
55d85d60fd
@ -288,7 +288,7 @@ func (js *jsre) startMining(call otto.FunctionCall) otto.Value {
|
||||
return otto.FalseValue()
|
||||
}
|
||||
} else {
|
||||
threads = 4
|
||||
threads = int64(js.ethereum.MinerThreads)
|
||||
}
|
||||
|
||||
err = js.ethereum.StartMining(int(threads))
|
||||
|
@ -190,6 +190,7 @@ type Ethereum struct {
|
||||
// logger logger.LogSystem
|
||||
|
||||
Mining bool
|
||||
MinerThreads int
|
||||
NatSpec bool
|
||||
DataDir string
|
||||
etherbase common.Address
|
||||
@ -262,6 +263,7 @@ func New(config *Config) (*Ethereum, error) {
|
||||
ethVersionId: config.ProtocolVersion,
|
||||
netVersionId: config.NetworkId,
|
||||
NatSpec: config.NatSpec,
|
||||
MinerThreads: config.MinerThreads,
|
||||
}
|
||||
|
||||
eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.EventMux())
|
||||
|
Loading…
Reference in New Issue
Block a user