From 1cf6ca8f10ab7dd5de29caf0d255c93cdec96994 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 23 Mar 2015 17:41:50 +0100 Subject: Add Close() method to EthereumApi To close the handler for LDB --- rpc/api.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'rpc/api.go') diff --git a/rpc/api.go b/rpc/api.go index 4cd88aa71..19bd9b707 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -44,6 +44,10 @@ func (api *EthereumApi) xethAtStateNum(num int64) *xeth.XEth { return api.xeth().AtStateNum(num) } +func (api *EthereumApi) Close() { + api.db.Close() +} + func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error { // Spec at https://github.com/ethereum/wiki/wiki/Generic-JSON-RPC rpclogger.Debugf("%s %s", req.Method, req.Params) -- cgit v1.2.3 From e954c24af02802cdee0870230b6dcfc898dd07cd Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 23 Mar 2015 18:06:05 +0100 Subject: Implement RPC net_version --- rpc/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rpc/api.go') diff --git a/rpc/api.go b/rpc/api.go index 19bd9b707..4bc199176 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -62,7 +62,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err case "web3_clientVersion": *reply = api.xeth().Backend().Version() case "net_version": - return NewNotImplementedError(req.Method) + *reply = string(api.xeth().Backend().ProtocolVersion()) case "net_listening": *reply = api.xeth().IsListening() case "net_peerCount": -- cgit v1.2.3