diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-06-11 18:58:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-11 18:58:17 +0800 |
commit | 9f7592c802838b5be7b95b3b8b063178813bb3bb (patch) | |
tree | 4447ef6273f11e11653beb316b8904c5d9ef0851 /rpc/utils.go | |
parent | 1d666cf27ec366a967d9afa0e8a370cb4cf33481 (diff) | |
parent | 99483e85b92e07078291442bf1cd4c0db22a262d (diff) | |
download | dexon-9f7592c802838b5be7b95b3b8b063178813bb3bb.tar dexon-9f7592c802838b5be7b95b3b8b063178813bb3bb.tar.gz dexon-9f7592c802838b5be7b95b3b8b063178813bb3bb.tar.bz2 dexon-9f7592c802838b5be7b95b3b8b063178813bb3bb.tar.lz dexon-9f7592c802838b5be7b95b3b8b063178813bb3bb.tar.xz dexon-9f7592c802838b5be7b95b3b8b063178813bb3bb.tar.zst dexon-9f7592c802838b5be7b95b3b8b063178813bb3bb.zip |
Merge pull request #16942 from karalabe/rpc-nil-reply
rpc: support returning nil pointer big.Ints (null)
Diffstat (limited to 'rpc/utils.go')
-rw-r--r-- | rpc/utils.go | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/rpc/utils.go b/rpc/utils.go index 9315cab59..7f7ac4520 100644 --- a/rpc/utils.go +++ b/rpc/utils.go @@ -22,7 +22,6 @@ import ( crand "crypto/rand" "encoding/binary" "encoding/hex" - "math/big" "math/rand" "reflect" "strings" @@ -105,20 +104,6 @@ func formatName(name string) string { return string(ret) } -var bigIntType = reflect.TypeOf((*big.Int)(nil)).Elem() - -// Indication if this type should be serialized in hex -func isHexNum(t reflect.Type) bool { - if t == nil { - return false - } - for t.Kind() == reflect.Ptr { - t = t.Elem() - } - - return t == bigIntType -} - // suitableCallbacks iterates over the methods of the given type. It will determine if a method satisfies the criteria // for a RPC callback or a subscription callback and adds it to the collection of callbacks or subscriptions. See server // documentation for a summary of these criteria. |