diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-14 19:44:24 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-14 19:44:24 +0800 |
commit | 35bc7b0d8a83eea0f13f7ad426722efd31562c74 (patch) | |
tree | 9c6dfd76e7369310e052fc9e6285a811b96d55b3 /rpc/api.go | |
parent | 532a74f50e6e79314816edbc14e5da7449a50709 (diff) | |
parent | f49e17eb392e7cabacc81146882024fd0e10a1d9 (diff) | |
download | dexon-35bc7b0d8a83eea0f13f7ad426722efd31562c74.tar.gz dexon-35bc7b0d8a83eea0f13f7ad426722efd31562c74.tar.zst dexon-35bc7b0d8a83eea0f13f7ad426722efd31562c74.zip |
Merge branch 'rpcfrontier' into develop
Diffstat (limited to 'rpc/api.go')
-rw-r--r-- | rpc/api.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go index 78e6a8136..47e19e2de 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -490,7 +490,13 @@ func (p *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error case "net_peerCount": *reply = toHex(big.NewInt(int64(p.xeth().PeerCount())).Bytes()) case "eth_coinbase": - *reply = p.xeth().Coinbase() + // TODO handling of empty coinbase due to lack of accounts + res := p.xeth().Coinbase() + if res == "0x" || res == "0x0" { + *reply = nil + } else { + *reply = res + } case "eth_mining": *reply = p.xeth().IsMining() case "eth_gasPrice": |