aboutsummaryrefslogtreecommitdiffstats
path: root/eth
diff options
context:
space:
mode:
authorJeffrey Wilcke <jeffrey@ethereum.org>2015-07-07 17:55:33 +0800
committerJeffrey Wilcke <jeffrey@ethereum.org>2015-07-07 17:55:33 +0800
commite5fba8fd7025bb45a88a19c1bbef80db5bd3b688 (patch)
treeb17726c936fcb695e26b2a145b5d423b8556871b /eth
parent916d1554675974adb92af4046e1b04ad3b26dca3 (diff)
parent37c1a8f69de44827a60296342189b6719a49dbc3 (diff)
downloadgo-tangerine-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar
go-tangerine-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.gz
go-tangerine-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.bz2
go-tangerine-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.lz
go-tangerine-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.xz
go-tangerine-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.tar.zst
go-tangerine-e5fba8fd7025bb45a88a19c1bbef80db5bd3b688.zip
Merge pull request #1428 from obscuren/coinbase-fixes
cmd,eth,rpc,tests: default coinbase
Diffstat (limited to 'eth')
-rw-r--r--eth/backend.go10
1 files changed, 8 insertions, 2 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 38e06bcf8..9f7a297f1 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -88,7 +88,7 @@ type Config struct {
Shh bool
Dial bool
- Etherbase string
+ Etherbase common.Address
GasPrice *big.Int
MinerThreads int
AccountManager *accounts.Manager
@@ -324,7 +324,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,
@@ -480,6 +480,12 @@ 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
+ self.miner.SetEtherbase(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 }