aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-04-02 19:04:58 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-04-02 19:04:58 +0800
commit2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc (patch)
tree6da894915da48bf8bbb7e7c4a9010c6ceb758bf5 /rpc
parent585aec127cb231d91998b33564b2294659f56ac1 (diff)
downloaddexon-2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc.tar
dexon-2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc.tar.gz
dexon-2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc.tar.bz2
dexon-2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc.tar.lz
dexon-2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc.tar.xz
dexon-2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc.tar.zst
dexon-2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc.zip
Guard for nil *big.Int
Diffstat (limited to 'rpc')
-rw-r--r--rpc/types.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/rpc/types.go b/rpc/types.go
index 0789a9901..806c9c8a4 100644
--- a/rpc/types.go
+++ b/rpc/types.go
@@ -83,7 +83,11 @@ func newHexData(input interface{}) *hexdata {
d.data = input.Bytes()
}
case *big.Int:
- d.data = input.Bytes()
+ if input == nil {
+ d.isNil = true
+ } else {
+ d.data = input.Bytes()
+ }
case int64:
d.data = big.NewInt(input).Bytes()
case uint64: