aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-07 16:32:05 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-07 16:32:05 +0800
commit35cd355c14d9a5266a7d4b11127d25eb7f961494 (patch)
tree879c8d86b8865f733c73992e8c04c71d52152437 /eth/backend.go
parentd764bd058457cd9eb91d205d1ac187d40c4866d6 (diff)
downloadgo-tangerine-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar.gz
go-tangerine-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar.zst
go-tangerine-35cd355c14d9a5266a7d4b11127d25eb7f961494.zip
cmd,eth,rpc,tests: default coinbase
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index e62252b6c..2c6f5b80c 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -87,7 +87,7 @@ type Config struct {
Shh bool
Dial bool
- Etherbase string
+ Etherbase common.Address
GasPrice *big.Int
MinerThreads int
AccountManager *accounts.Manager
@@ -322,7 +322,7 @@ func New(config *Config) (*Ethereum, error) {
eventMux: &event.TypeMux{},
accountManager: config.AccountManager,
DataDir: config.DataDir,
- etherbase: common.HexToAddress(config.Etherbase),
+ etherbase: config.Etherbase,
clientVersion: config.Name, // TODO should separate from Name
netVersionId: config.NetworkId,
NatSpec: config.NatSpec,
@@ -469,6 +469,11 @@ func (s *Ethereum) Etherbase() (eb common.Address, err error) {
return
}
+// set in js console via admin interface or wrapper from cli flags
+func (self *Ethereum) SetEtherbase(etherbase common.Address) {
+ self.etherbase = etherbase
+}
+
func (s *Ethereum) StopMining() { s.miner.Stop() }
func (s *Ethereum) IsMining() bool { return s.miner.Mining() }
func (s *Ethereum) Miner() *miner.Miner { return s.miner }