Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
55d85d60
Commit
55d85d60
authored
May 15, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eth, cmd/geth: start mining from console respects CLI flag
parent
d3e84cc8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
admin.go
cmd/geth/admin.go
+1
-1
backend.go
eth/backend.go
+2
-0
No files found.
cmd/geth/admin.go
View file @
55d85d60
...
@@ -288,7 +288,7 @@ func (js *jsre) startMining(call otto.FunctionCall) otto.Value {
...
@@ -288,7 +288,7 @@ func (js *jsre) startMining(call otto.FunctionCall) otto.Value {
return
otto
.
FalseValue
()
return
otto
.
FalseValue
()
}
}
}
else
{
}
else
{
threads
=
4
threads
=
int64
(
js
.
ethereum
.
MinerThreads
)
}
}
err
=
js
.
ethereum
.
StartMining
(
int
(
threads
))
err
=
js
.
ethereum
.
StartMining
(
int
(
threads
))
...
...
eth/backend.go
View file @
55d85d60
...
@@ -190,6 +190,7 @@ type Ethereum struct {
...
@@ -190,6 +190,7 @@ type Ethereum struct {
// logger logger.LogSystem
// logger logger.LogSystem
Mining
bool
Mining
bool
MinerThreads
int
NatSpec
bool
NatSpec
bool
DataDir
string
DataDir
string
etherbase
common
.
Address
etherbase
common
.
Address
...
@@ -262,6 +263,7 @@ func New(config *Config) (*Ethereum, error) {
...
@@ -262,6 +263,7 @@ func New(config *Config) (*Ethereum, error) {
ethVersionId
:
config
.
ProtocolVersion
,
ethVersionId
:
config
.
ProtocolVersion
,
netVersionId
:
config
.
NetworkId
,
netVersionId
:
config
.
NetworkId
,
NatSpec
:
config
.
NatSpec
,
NatSpec
:
config
.
NatSpec
,
MinerThreads
:
config
.
MinerThreads
,
}
}
eth
.
chainManager
=
core
.
NewChainManager
(
blockDb
,
stateDb
,
eth
.
EventMux
())
eth
.
chainManager
=
core
.
NewChainManager
(
blockDb
,
stateDb
,
eth
.
EventMux
())
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment