aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-04-02 19:39:46 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-04-02 19:39:46 +0800
commit118ad22ee59658ec8ff476999e48d9bffb0c7db6 (patch)
treeb60422477450918993bdce27f22cd45d81952bd8 /rpc
parent81de8ed0912f767b2e3104aaad5c7f31920aaf2a (diff)
parent79828531b1e6a1d5073f45e0e672c54a019de7c0 (diff)
downloaddexon-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar
dexon-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.gz
dexon-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.bz2
dexon-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.lz
dexon-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.xz
dexon-118ad22ee59658ec8ff476999e48d9bffb0c7db6.tar.zst
dexon-118ad22ee59658ec8ff476999e48d9bffb0c7db6.zip
Merge branch 'develop' into rpcfabian
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api.go10
1 files changed, 4 insertions, 6 deletions
diff --git a/rpc/api.go b/rpc/api.go
index b554dc16b..5e27890ce 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -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 {
@@ -95,10 +96,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
return err
}
- state := api.xethAtStateNum(args.BlockNumber).State().SafeGet(args.Address)
- value := state.StorageString(args.Key)
-
- *reply = common.ToHex(value.Bytes())
+ *reply = api.xethAtStateNum(args.BlockNumber).StorageAt(args.Address, args.Key)
case "eth_getTransactionCount":
args := new(GetTxCountArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {