diff options
author | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-07 16:32:05 +0800 |
---|---|---|
committer | Jeffrey Wilcke <geffobscura@gmail.com> | 2015-07-07 16:32:05 +0800 |
commit | 35cd355c14d9a5266a7d4b11127d25eb7f961494 (patch) | |
tree | 879c8d86b8865f733c73992e8c04c71d52152437 /rpc/api/miner.go | |
parent | d764bd058457cd9eb91d205d1ac187d40c4866d6 (diff) | |
download | dexon-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar dexon-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar.gz dexon-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar.bz2 dexon-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar.lz dexon-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar.xz dexon-35cd355c14d9a5266a7d4b11127d25eb7f961494.tar.zst dexon-35cd355c14d9a5266a7d4b11127d25eb7f961494.zip |
cmd,eth,rpc,tests: default coinbase
Diffstat (limited to 'rpc/api/miner.go')
-rw-r--r-- | rpc/api/miner.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/rpc/api/miner.go b/rpc/api/miner.go index 7a84cb9ae..4e237751a 100644 --- a/rpc/api/miner.go +++ b/rpc/api/miner.go @@ -19,6 +19,7 @@ var ( "miner_makeDAG": (*minerApi).MakeDAG, "miner_setExtra": (*minerApi).SetExtra, "miner_setGasPrice": (*minerApi).SetGasPrice, + "admin_setEtherbase": (*minerApi).SetEtherbase, "miner_startAutoDAG": (*minerApi).StartAutoDAG, "miner_start": (*minerApi).StartMiner, "miner_stopAutoDAG": (*minerApi).StopAutoDAG, @@ -119,6 +120,15 @@ func (self *minerApi) SetGasPrice(req *shared.Request) (interface{}, error) { return true, nil } +func (self *minerApi) SetEtherbase(req *shared.Request) (interface{}, error) { + args := new(SetEtherbaseArgs) + if err := self.codec.Decode(req.Params, &args); err != nil { + return false, err + } + self.ethereum.SetEtherbase(args.Etherbase) + return nil, nil +} + func (self *minerApi) StartAutoDAG(req *shared.Request) (interface{}, error) { self.ethereum.StartAutoDAG() return true, nil |