From 2efb89d5440a9e43bec75b5f59032a0ff0cdc3cc Mon Sep 17 00:00:00 2001
From: Taylor Gerring <taylor.gerring@gmail.com>
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 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:
-- 
GitLab