diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-02 18:57:04 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-02 18:57:04 +0800 |
commit | 0f3bf7ef4de95b8012eb9bba717323b9e89c5908 (patch) | |
tree | 611678435f88b26e0f111e1a485b015085fd30fc /rpc/api.go | |
parent | 7e13ee602e003ad2a3db6d822d24f220f23d632e (diff) | |
download | go-tangerine-0f3bf7ef4de95b8012eb9bba717323b9e89c5908.tar.gz go-tangerine-0f3bf7ef4de95b8012eb9bba717323b9e89c5908.tar.zst go-tangerine-0f3bf7ef4de95b8012eb9bba717323b9e89c5908.zip |
Fixes for balance
Diffstat (limited to 'rpc/api.go')
-rw-r--r-- | rpc/api.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/rpc/api.go b/rpc/api.go index 80dd27afb..d9206eb79 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -36,7 +36,7 @@ func (api *EthereumApi) xethAtStateNum(num int64) *xeth.XEth { func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) error { // Spec at https://github.com/ethereum/wiki/wiki/JSON-RPC - rpclogger.Debugf("%s %s", req.Method, req.Params) + rpclogger.Infof("%s %s", req.Method, req.Params) switch req.Method { case "web3_sha3": @@ -80,8 +80,9 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err return err } - v := api.xethAtStateNum(args.BlockNumber).State().SafeGet(args.Address).Balance() - *reply = common.ToHex(v.Bytes()) + *reply = api.xethAtStateNum(args.BlockNumber).BalanceAt(args.Address) + //v := api.xethAtStateNum(args.BlockNumber).State().SafeGet(args.Address).Balance() + //*reply = common.ToHex(v.Bytes()) case "eth_getStorage", "eth_storageAt": args := new(GetStorageArgs) if err := json.Unmarshal(req.Params, &args); err != nil { |