good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
c98d9b49
Commit
c98d9b49
authored
Jun 22, 2017
by
Péter Szilágyi
Committed by
GitHub
Jun 22, 2017
Browse files
Options
Downloads
Plain Diff
Merge pull request #14677 from karalabe/miner-cli-gasprice
cmd/geth: corrently init gas price for CLI CPU mining
parents
0042f13d
d4326888
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
cmd/geth/main.go
+4
-0
4 additions, 0 deletions
cmd/geth/main.go
with
4 additions
and
0 deletions
cmd/geth/main.go
+
4
−
0
View file @
c98d9b49
...
...
@@ -252,10 +252,12 @@ func startNode(ctx *cli.Context, stack *node.Node) {
}()
// Start auxiliary services if enabled
if
ctx
.
GlobalBool
(
utils
.
MiningEnabledFlag
.
Name
)
{
// Mining only makes sense if a full Ethereum node is running
var
ethereum
*
eth
.
Ethereum
if
err
:=
stack
.
Service
(
&
ethereum
);
err
!=
nil
{
utils
.
Fatalf
(
"ethereum service not running: %v"
,
err
)
}
// Use a reduced number of threads if requested
if
threads
:=
ctx
.
GlobalInt
(
utils
.
MinerThreadsFlag
.
Name
);
threads
>
0
{
type
threaded
interface
{
SetThreads
(
threads
int
)
...
...
@@ -264,6 +266,8 @@ func startNode(ctx *cli.Context, stack *node.Node) {
th
.
SetThreads
(
threads
)
}
}
// Set the gas price to the limits from the CLI and start mining
ethereum
.
TxPool
()
.
SetGasPrice
(
utils
.
GlobalBig
(
ctx
,
utils
.
GasPriceFlag
.
Name
))
if
err
:=
ethereum
.
StartMining
(
true
);
err
!=
nil
{
utils
.
Fatalf
(
"Failed to start mining: %v"
,
err
)
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment