aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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: