From 2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Thu, 2 Apr 2015 13:04:58 +0200 Subject: [PATCH] Guard for nil *big.Int --- rpc/types.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rpc/types.go b/rpc/types.go index 0789a99017..806c9c8a43 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: