Don't expose backend directly

This commit is contained in:
Taylor Gerring
2015-03-24 16:33:37 +01:00
parent b9b7442b74
commit 59b6b619a2
2 changed files with 20 additions and 9 deletions

View File

@ -60,9 +60,9 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
}
*reply = common.ToHex(crypto.Sha3(common.FromHex(args.Data)))
case "web3_clientVersion":
*reply = api.xeth().Backend().Version()
*reply = api.xeth().ClientVersion()
case "net_version":
*reply = string(api.xeth().Backend().ProtocolVersion())
*reply = api.xeth().NetworkVersion()
case "net_listening":
*reply = api.xeth().IsListening()
case "net_peerCount":
@ -84,7 +84,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
case "eth_accounts":
*reply = api.xeth().Accounts()
case "eth_blockNumber":
v := api.xeth().Backend().ChainManager().CurrentBlock().Number()
v := api.xeth().CurrentBlock().Number()
*reply = common.ToHex(v.Bytes())
case "eth_getBalance":
args := new(GetBalanceArgs)