Add Close() method to EthereumApi
To close the handler for LDB
This commit is contained in:
parent
1e61b75cbf
commit
1cf6ca8f10
@ -91,6 +91,7 @@ func newJSRE(ethereum *eth.Ethereum, libPath string) *jsre {
|
||||
func (js *jsre) apiBindings() {
|
||||
|
||||
ethApi := rpc.NewEthereumApi(js.xeth, js.ethereum.DataDir)
|
||||
ethApi.Close()
|
||||
//js.re.Bind("jeth", rpc.NewJeth(ethApi, js.re.ToVal))
|
||||
|
||||
jeth := rpc.NewJeth(ethApi, js.re.ToVal, js.re)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user