From d0c3f127eee44274f72377085535d4c25e8b0f55 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Tue, 7 Apr 2015 06:49:31 -0500 Subject: More type fixes --- rpc/api.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/rpc/api.go b/rpc/api.go index 91142e387..6e2ae2e93 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -98,7 +98,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err } count := api.xethAtStateNum(args.BlockNumber).TxCountAt(args.Address) - *reply = common.ToHex(big.NewInt(int64(count)).Bytes()) + *reply = newHexNum(big.NewInt(int64(count)).Bytes()) case "eth_getBlockTransactionCountByHash": args := new(HashArgs) if err := json.Unmarshal(req.Params, &args); err != nil { @@ -109,7 +109,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err if block == nil { *reply = nil } else { - *reply = common.ToHex(big.NewInt(int64(len(block.Transactions))).Bytes()) + *reply = newHexNum(big.NewInt(int64(len(block.Transactions))).Bytes()) } case "eth_getBlockTransactionCountByNumber": args := new(BlockNumArg) @@ -123,7 +123,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err break } - *reply = common.ToHex(big.NewInt(int64(len(block.Transactions))).Bytes()) + *reply = newHexNum(big.NewInt(int64(len(block.Transactions))).Bytes()) case "eth_getUncleCountByBlockHash": args := new(HashArgs) if err := json.Unmarshal(req.Params, &args); err != nil { @@ -137,7 +137,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err break } - *reply = common.ToHex(big.NewInt(int64(len(br.Uncles))).Bytes()) + *reply = newHexNum(big.NewInt(int64(len(br.Uncles))).Bytes()) case "eth_getUncleCountByBlockNumber": args := new(BlockNumArg) if err := json.Unmarshal(req.Params, &args); err != nil { @@ -151,7 +151,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err break } - *reply = common.ToHex(big.NewInt(int64(len(br.Uncles))).Bytes()) + *reply = newHexNum(big.NewInt(int64(len(br.Uncles))).Bytes()) case "eth_getData", "eth_getCode": args := new(GetDataArgs) if err := json.Unmarshal(req.Params, &args); err != nil { @@ -305,14 +305,13 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err } id := api.xeth().RegisterFilter(args.Earliest, args.Latest, args.Skip, args.Max, args.Address, args.Topics) - *reply = common.ToHex(big.NewInt(int64(id)).Bytes()) + *reply = newHexNum(big.NewInt(int64(id)).Bytes()) case "eth_newBlockFilter": args := new(FilterStringArgs) if err := json.Unmarshal(req.Params, &args); err != nil { return err } - id := api.xeth().NewFilterString(args.Word) - *reply = common.ToHex(big.NewInt(int64(id)).Bytes()) + *reply = newHexNum(api.xeth().NewFilterString(args.Word)) case "eth_uninstallFilter": args := new(FilterIdArgs) if err := json.Unmarshal(req.Params, &args); err != nil { @@ -394,7 +393,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err } res, _ := api.xeth().DbGet([]byte(args.Database + args.Key)) - *reply = common.ToHex(res) + *reply = newHexData(res) case "shh_version": *reply = api.xeth().WhisperVersion() case "shh_post": @@ -435,7 +434,7 @@ func (api *EthereumApi) GetRequestReply(req *RpcRequest, reply *interface{}) err opts.To = args.To opts.Topics = args.Topics id := api.xeth().NewWhisperFilter(opts) - *reply = common.ToHex(big.NewInt(int64(id)).Bytes()) + *reply = newHexNum(big.NewInt(int64(id)).Bytes()) case "shh_uninstallFilter": args := new(FilterIdArgs) if err := json.Unmarshal(req.Params, &args); err != nil { -- cgit 3'>branches/2017Q3 FreeBSD Ports (https://github.com/freebsd/freebsd-ports)
aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils/asmem
Commit message (Expand)AuthorAgeFilesLines
* De-pkg-comment.Akinori MUSHA2003-02-212-1/+1
* Upgrade to version 1.8Kevin Lo2001-04-154-240/+3
* (1) Add new variable, XFREE86_VERSION, to specify which version ofSatoshi Asami2000-08-031-3/+2
* Update to 1.6. Set this port BROKEN on 4.0+; I confirmed that bento isWill Andrews2000-04-234-69/+69
* Update with the new PORTNAME/PORTVERSION variableChris Piazza2000-04-101-2/+3
* Update to version 1.5.Steve Price1999-12-252-6/+6
* Update to version 1.4.Steve Price1999-09-272-3/+3
* $Id$ -> $FreeBSD$Peter Wemm1999-08-311-1/+1
* BROKEN= 'Sorry, asmem doesn't compile on 4.0+'Chris Piazza1999-08-261-2/+7
* Update to version 1.3Bill Fenner1999-08-222-5/+6
* #4/4 enforcing Caps, no periodTim Vanderhoek1999-06-271-1/+1