Skip to content

Commit 2b49cf5

Browse files
author
Chris Chinchilla
committed
Remove extraneous #ADDED comments
1 parent a63c72c commit 2b49cf5

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

RLP.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,14 @@ def decode_length(input):
128128
return (0, 1, str)
129129
elif prefix <= 0xb7 and length > prefix - 0x80:
130130
strLen = prefix - 0x80
131-
# ADDED:
132131
if strLen == 1 and ord(input[1]) <= 0x7f:
133132
raise Exception("single byte below 128 must be encoded as itself")
134133
return (1, strLen, str)
135134
elif prefix <= 0xbf and length > prefix - 0xb7 and length > prefix - 0xb7 + to_integer(substr(input, 1, prefix - 0xb7)):
136135
lenOfStrLen = prefix - 0xb7
137-
# ADDED:
138136
if input[1] == 0:
139137
raise Exception("multi-byte length must have no leading zero");
140138
strLen = to_integer(substr(input, 1, lenOfStrLen))
141-
# ADDED:
142139
if strLen < 56:
143140
raise Exception("length below 56 must be encoded in one byte");
144141
return (1 + lenOfStrLen, strLen, str)
@@ -147,11 +144,9 @@ def decode_length(input):
147144
return (1, listLen, list)
148145
elif prefix <= 0xff and length > prefix - 0xf7 and length > prefix - 0xf7 + to_integer(substr(input, 1, prefix - 0xf7)):
149146
lenOfListLen = prefix - 0xf7
150-
# ADDED:
151147
if input[1] == 0:
152148
raise Exception("multi-byte length must have no leading zero");
153149
listLen = to_integer(substr(input, 1, lenOfListLen))
154-
# ADDED:
155150
if listLen < 56:
156151
raise Exception("length below 56 must be encoded in one byte");
157152
return (1 + lenOfListLen, listLen, list)

0 commit comments

Comments
 (0)