From 60c43d195289e65af2146d8655350b7f7dca66b7 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Wed, 18 Mar 2015 11:10:08 -0400 Subject: [PATCH] Remove i2hex --- rpc/api.go | 4 ++-- rpc/util.go | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/rpc/api.go b/rpc/api.go index 57075bffc3..6154a0b286 100644 --- a/rpc/api.go +++ b/rpc/api.go @@ -161,7 +161,7 @@ func (self *EthereumApi) NewFilter(args *FilterOptions, reply *interface{}) erro id = self.filterManager.InstallFilter(filter) self.logs[id] = &logFilter{timeout: time.Now()} - *reply = i2hex(id) + *reply = common.ToHex(big.NewInt(int64(id)).Bytes()) return nil } @@ -198,7 +198,7 @@ func (self *EthereumApi) NewFilterString(args *FilterStringArgs, reply *interfac id = self.filterManager.InstallFilter(filter) self.logs[id] = &logFilter{timeout: time.Now()} - *reply = i2hex(id) + *reply = common.ToHex(big.NewInt(int64(id)).Bytes()) return nil } diff --git a/rpc/util.go b/rpc/util.go index 230d0dcf1f..3e2792c075 100644 --- a/rpc/util.go +++ b/rpc/util.go @@ -19,7 +19,6 @@ package rpc import ( "encoding/json" "fmt" - "math/big" "reflect" "time" @@ -90,10 +89,6 @@ func UnmarshalRawMessages(b []byte, iface interface{}, number *int64) (err error return nil } -func i2hex(n int) string { - return common.ToHex(big.NewInt(int64(n)).Bytes()) -} - type Log struct { Address string `json:"address"` Topic []string `json:"topic"`