diff options
author | obscuren <obscuren@obscura.com> | 2013-12-28 09:24:01 +0800 |
---|---|---|
committer | obscuren <obscuren@obscura.com> | 2013-12-28 09:24:01 +0800 |
commit | 5a7eae705b83d75cb780279e386f183c4b6e19c6 (patch) | |
tree | 132efdfe17e3af1faa628a84768d3e635d40f355 /rlp.go | |
parent | d6460f3de171f018860ea9c3f4a69536c8ef82ac (diff) | |
download | dexon-5a7eae705b83d75cb780279e386f183c4b6e19c6.tar dexon-5a7eae705b83d75cb780279e386f183c4b6e19c6.tar.gz dexon-5a7eae705b83d75cb780279e386f183c4b6e19c6.tar.bz2 dexon-5a7eae705b83d75cb780279e386f183c4b6e19c6.tar.lz dexon-5a7eae705b83d75cb780279e386f183c4b6e19c6.tar.xz dexon-5a7eae705b83d75cb780279e386f183c4b6e19c6.tar.zst dexon-5a7eae705b83d75cb780279e386f183c4b6e19c6.zip |
Removed slice appending for integers
Diffstat (limited to 'rlp.go')
-rw-r--r-- | rlp.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -45,7 +45,7 @@ func Decode(data []byte, pos int) (interface{}, int) { slice := make([]interface{}, 0) switch { case char < 24: - return append(slice, data[pos]), pos + 1 + return data[pos], pos + 1 case char < 56: b := int(data[pos]) - 23 return FromBin(data[pos+1 : pos+1+b]), pos + 1 + b @@ -72,7 +72,7 @@ func Decode(data []byte, pos int) (interface{}, int) { return slice, pos case char < 192: b := int(data[pos]) - 183 - //b2 := int(FromBin(data[pos+1 : pos+1+b])) (ref imprementation has an unused variable) + //b2 := int(FromBin(data[pos+1 : pos+1+b])) (ref implementation has an unused variable) pos = pos+1+b for i := 0; i < b; i++ { var obj interface{} |