good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
E
Erigon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
a
Erigon
Commits
37c1a8f6
Commit
37c1a8f6
authored
9 years ago
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
eth,miner,rpc: set coinbase
parent
35cd355c
Loading
Loading
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
eth/backend.go
+1
-0
1 addition, 0 deletions
eth/backend.go
miner/miner.go
+5
-0
5 additions, 0 deletions
miner/miner.go
miner/worker.go
+6
-0
6 additions, 0 deletions
miner/worker.go
rpc/api/miner.go
+1
-1
1 addition, 1 deletion
rpc/api/miner.go
with
13 additions
and
1 deletion
eth/backend.go
+
1
−
0
View file @
37c1a8f6
...
...
@@ -472,6 +472,7 @@ func (s *Ethereum) Etherbase() (eb common.Address, err error) {
// set in js console via admin interface or wrapper from cli flags
func
(
self
*
Ethereum
)
SetEtherbase
(
etherbase
common
.
Address
)
{
self
.
etherbase
=
etherbase
self
.
miner
.
SetEtherbase
(
etherbase
)
}
func
(
s
*
Ethereum
)
StopMining
()
{
s
.
miner
.
Stop
()
}
...
...
This diff is collapsed.
Click to expand it.
miner/miner.go
+
5
−
0
View file @
37c1a8f6
...
...
@@ -137,3 +137,8 @@ func (self *Miner) PendingState() *state.StateDB {
func
(
self
*
Miner
)
PendingBlock
()
*
types
.
Block
{
return
self
.
worker
.
pendingBlock
()
}
func
(
self
*
Miner
)
SetEtherbase
(
addr
common
.
Address
)
{
self
.
coinbase
=
addr
self
.
worker
.
setEtherbase
(
addr
)
}
This diff is collapsed.
Click to expand it.
miner/worker.go
+
6
−
0
View file @
37c1a8f6
...
...
@@ -124,6 +124,12 @@ func newWorker(coinbase common.Address, eth core.Backend) *worker {
return
worker
}
func
(
self
*
worker
)
setEtherbase
(
addr
common
.
Address
)
{
self
.
mu
.
Lock
()
defer
self
.
mu
.
Unlock
()
self
.
coinbase
=
addr
}
func
(
self
*
worker
)
pendingState
()
*
state
.
StateDB
{
self
.
currentMu
.
Lock
()
defer
self
.
currentMu
.
Unlock
()
...
...
This diff is collapsed.
Click to expand it.
rpc/api/miner.go
+
1
−
1
View file @
37c1a8f6
...
...
@@ -19,7 +19,7 @@ var (
"miner_makeDAG"
:
(
*
minerApi
)
.
MakeDAG
,
"miner_setExtra"
:
(
*
minerApi
)
.
SetExtra
,
"miner_setGasPrice"
:
(
*
minerApi
)
.
SetGasPrice
,
"
ad
min_setEtherbase"
:
(
*
minerApi
)
.
SetEtherbase
,
"min
er
_setEtherbase"
:
(
*
minerApi
)
.
SetEtherbase
,
"miner_startAutoDAG"
:
(
*
minerApi
)
.
StartAutoDAG
,
"miner_start"
:
(
*
minerApi
)
.
StartMiner
,
"miner_stopAutoDAG"
:
(
*
minerApi
)
.
StopAutoDAG
,
...
...
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