aboutsummaryrefslogtreecommitdiffstats
path: root/ethutil/rlp.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-11 09:05:58 +0800
committerobscuren <geffobscura@gmail.com>2014-04-11 09:05:58 +0800
commit7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0 (patch)
treeb529de034a77da5a4a35526eb4800863ddf1fbdb /ethutil/rlp.go
parentd927c154e77027924756d3538139ce0910b1c23a (diff)
parent25dd46061fc3b732056ea87fe4a9696e160179cc (diff)
downloaddexon-7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0.tar
dexon-7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0.tar.gz
dexon-7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0.tar.bz2
dexon-7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0.tar.lz
dexon-7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0.tar.xz
dexon-7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0.tar.zst
dexon-7d6ba88d2b4a263f2a898c3ef6d40e5258f96bb0.zip
Merge branch 'split' into develop
Diffstat (limited to 'ethutil/rlp.go')
-rw-r--r--ethutil/rlp.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/ethutil/rlp.go b/ethutil/rlp.go
index e6c75696e..d95ace425 100644
--- a/ethutil/rlp.go
+++ b/ethutil/rlp.go
@@ -186,7 +186,12 @@ func Encode(object interface{}) []byte {
case byte:
buff.Write(Encode(big.NewInt(int64(t))))
case *big.Int:
- buff.Write(Encode(t.Bytes()))
+ // Not sure how this is possible while we check for
+ if t == nil {
+ buff.WriteByte(0xc0)
+ } else {
+ buff.Write(Encode(t.Bytes()))
+ }
case []byte:
if len(t) == 1 && t[0] <= 0x7f {
buff.Write(t)