From 47af2f02cb6b03d1fec1b0cecff8cab965b33edc Mon Sep 17 00:00:00 2001 From: Kobi Gurkan Date: Fri, 27 Mar 2015 22:22:13 +0300 Subject: [PATCH] eth_getTransactionCount now returns a hex string --- rpc/api.go | 4 ++-- 1 file 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 {