Default gas
This commit is contained in:
@ -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()
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user