aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-24 00:41:50 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-24 00:41:50 +0800
commit1cf6ca8f10ab7dd5de29caf0d255c93cdec96994 (patch)
tree9e121387e41895b703ff88e5e65b231913d65201 /rpc
parent1e61b75cbf0830a72b40d0eed8f924cb7bb61aa3 (diff)
downloaddexon-1cf6ca8f10ab7dd5de29caf0d255c93cdec96994.tar.gz
dexon-1cf6ca8f10ab7dd5de29caf0d255c93cdec96994.tar.zst
dexon-1cf6ca8f10ab7dd5de29caf0d255c93cdec96994.zip
Add Close() method to EthereumApi
To close the handler for LDB
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api.go4
1 files changed, 4 insertions, 0 deletions
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)