aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-04-02 20:00:49 +0800
committerobscuren <geffobscura@gmail.com>2015-04-02 20:00:49 +0800
commit1e28b424e7f0f0d16f467ac7bac08b9dc0384106 (patch)
treebfed2a8a37bac9a4c25d1999156f2ec5b5b672ec /rpc
parent55b1c1546b72b24b087cecf18f3e52bad5c758c8 (diff)
downloaddexon-1e28b424e7f0f0d16f467ac7bac08b9dc0384106.tar
dexon-1e28b424e7f0f0d16f467ac7bac08b9dc0384106.tar.gz
dexon-1e28b424e7f0f0d16f467ac7bac08b9dc0384106.tar.bz2
dexon-1e28b424e7f0f0d16f467ac7bac08b9dc0384106.tar.lz
dexon-1e28b424e7f0f0d16f467ac7bac08b9dc0384106.tar.xz
dexon-1e28b424e7f0f0d16f467ac7bac08b9dc0384106.tar.zst
dexon-1e28b424e7f0f0d16f467ac7bac08b9dc0384106.zip
Default gas
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api.go2
-rw-r--r--rpc/jeth.go2
2 files changed, 3 insertions, 1 deletions
diff --git a/rpc/api.go b/rpc/api.go
index 4a17d3b15..44146c8c7 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -67,7 +67,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
case "eth_mining":
*reply = api.xeth().IsMining()
case "eth_gasPrice":
- v := api.xeth().DefaultGas()
+ v := xeth.DefaultGas()
*reply = common.ToHex(v.Bytes())
case "eth_accounts":
*reply = api.xeth().Accounts()
diff --git a/rpc/jeth.go b/rpc/jeth.go
index 9d33f45e1..e83212bb5 100644
--- a/rpc/jeth.go
+++ b/rpc/jeth.go
@@ -2,6 +2,7 @@ package rpc
import (
"encoding/json"
+ "fmt"
// "fmt"
"github.com/ethereum/go-ethereum/jsre"
"github.com/robertkrimen/otto"
@@ -42,6 +43,7 @@ func (self *Jeth) Send(call otto.FunctionCall) (response otto.Value) {
var respif interface{}
err = self.ethApi.GetRequestReply(&req, &respif)
if err != nil {
+ fmt.Printf("error: %s\n", err)
return self.err(-32603, err.Error(), req.Id)
}
self.re.Set("ret_jsonrpc", jsonrpcver)