diff options
author | Bas van Kervel <bas@ethdev.com> | 2015-06-22 18:47:32 +0800 |
---|---|---|
committer | Bas van Kervel <bas@ethdev.com> | 2015-06-22 18:47:32 +0800 |
commit | 2e0b56a72b3eafc89938003da29c06496ac9ad4e (patch) | |
tree | eba3eb3a822da0ba7de98d9c7b6dc8601a63db0a /rpc/jeth.go | |
parent | 2737baa6577a337f33f020d587af100c9bda3585 (diff) | |
download | dexon-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar dexon-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.gz dexon-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.bz2 dexon-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.lz dexon-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.xz dexon-2e0b56a72b3eafc89938003da29c06496ac9ad4e.tar.zst dexon-2e0b56a72b3eafc89938003da29c06496ac9ad4e.zip |
added RPC start/stop support
Diffstat (limited to 'rpc/jeth.go')
-rw-r--r-- | rpc/jeth.go | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/rpc/jeth.go b/rpc/jeth.go index e656e8fa9..33fcd6efd 100644 --- a/rpc/jeth.go +++ b/rpc/jeth.go @@ -4,25 +4,24 @@ import ( "encoding/json" "github.com/ethereum/go-ethereum/jsre" - "github.com/ethereum/go-ethereum/rpc/api" "github.com/ethereum/go-ethereum/rpc/comms" "github.com/ethereum/go-ethereum/rpc/shared" "github.com/robertkrimen/otto" ) type Jeth struct { - ethApi api.EthereumApi + ethApi shared.EthereumApi re *jsre.JSRE client comms.EthereumClient } -func NewJeth(ethApi api.EthereumApi, re *jsre.JSRE, client comms.EthereumClient) *Jeth { +func NewJeth(ethApi shared.EthereumApi, re *jsre.JSRE, client comms.EthereumClient) *Jeth { return &Jeth{ethApi, re, client} } func (self *Jeth) err(call otto.FunctionCall, code int, msg string, id interface{}) (response otto.Value) { rpcerr := &shared.ErrorObject{code, msg} - call.Otto.Set("ret_jsonrpc", api.JsonRpcVersion) + call.Otto.Set("ret_jsonrpc", shared.JsonRpcVersion) call.Otto.Set("ret_id", id) call.Otto.Set("ret_error", rpcerr) response, _ = call.Otto.Run(` @@ -61,7 +60,7 @@ func (self *Jeth) Send(call otto.FunctionCall) (response otto.Value) { return self.err(call, -32603, err.Error(), req.Id) } - call.Otto.Set("ret_jsonrpc", api.JsonRpcVersion) + call.Otto.Set("ret_jsonrpc", shared.JsonRpcVersion) call.Otto.Set("ret_id", req.Id) res, _ := json.Marshal(respif) |