aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorKobi Gurkan <kobigurk@gmail.com>2015-03-28 03:22:13 +0800
committerKobi Gurkan <kobigurk@gmail.com>2015-03-28 03:22:13 +0800
commit47af2f02cb6b03d1fec1b0cecff8cab965b33edc (patch)
tree2d75600952fca29baae74984e247cb84c9478016 /rpc
parent3ea8c7301e6227467e39ae3daa0f382f06b16fba (diff)
downloadgo-tangerine-47af2f02cb6b03d1fec1b0cecff8cab965b33edc.tar.gz
go-tangerine-47af2f02cb6b03d1fec1b0cecff8cab965b33edc.tar.zst
go-tangerine-47af2f02cb6b03d1fec1b0cecff8cab965b33edc.zip
eth_getTransactionCount now returns a hex string
Diffstat (limited to 'rpc')
-rw-r--r--rpc/api.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/rpc/api.go b/rpc/api.go
index f2915f658..2b81fdd2b 100644
--- a/rpc/api.go
+++ b/rpc/api.go
@@ -122,8 +122,8 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err
if err != nil {
return err
}
-
- *reply = api.xethAtStateNum(args.BlockNumber).TxCountAt(args.Address)
+ count := api.xethAtStateNum(args.BlockNumber).TxCountAt(args.Address)
+ *reply = common.ToHex(big.NewInt(int64(count)).Bytes())
case "eth_getBlockTransactionCountByHash":
args := new(GetBlockByHashArgs)
if err := json.Unmarshal(req.Params, &args); err != nil {