Fixed unreachable code issue
This commit is contained in:
parent
18c19cd618
commit
611eb9db87
|
@ -51,7 +51,6 @@ def decodeBase58(string, alphabet=ALPHABET):
|
||||||
"""
|
"""
|
||||||
base = len(alphabet)
|
base = len(alphabet)
|
||||||
num = 0
|
num = 0
|
||||||
|
|
||||||
try:
|
try:
|
||||||
for char in string:
|
for char in string:
|
||||||
num *= base
|
num *= base
|
||||||
|
@ -253,12 +252,14 @@ def decodeAddress(address):
|
||||||
embeddedRipeData = data[bytesUsedByVersionNumber +
|
embeddedRipeData = data[bytesUsedByVersionNumber +
|
||||||
bytesUsedByStreamNumber:-4]
|
bytesUsedByStreamNumber:-4]
|
||||||
if len(embeddedRipeData) == 19:
|
if len(embeddedRipeData) == 19:
|
||||||
return status, addressVersionNumber, streamNumber, '\x00' + embeddedRipeData
|
return status, addressVersionNumber, streamNumber, \
|
||||||
|
'\x00', embeddedRipeData
|
||||||
elif len(embeddedRipeData) == 20:
|
elif len(embeddedRipeData) == 20:
|
||||||
return status, addressVersionNumber, streamNumber, embeddedRipeData
|
return status, addressVersionNumber, streamNumber, \
|
||||||
|
embeddedRipeData
|
||||||
elif len(embeddedRipeData) == 18:
|
elif len(embeddedRipeData) == 18:
|
||||||
return status, addressVersionNumber, streamNumber, '\x00\x00'
|
return status, addressVersionNumber, streamNumber, \
|
||||||
+ embeddedRipeData
|
'\x00\x00', embeddedRipeData
|
||||||
elif len(embeddedRipeData) < 18:
|
elif len(embeddedRipeData) < 18:
|
||||||
return 'ripetooshort', 0, 0, ""
|
return 'ripetooshort', 0, 0, ""
|
||||||
elif len(embeddedRipeData) > 20:
|
elif len(embeddedRipeData) > 20:
|
||||||
|
|
|
@ -799,7 +799,7 @@ class singleWorker(threading.Thread, StoppableThread):
|
||||||
self.requestPubKey(toaddress)
|
self.requestPubKey(toaddress)
|
||||||
continue
|
continue
|
||||||
# on with the next msg on which we can do some work
|
# on with the next msg on which we can do some work
|
||||||
# At this point we know that we have the necessary
|
# At this point we know that we have the necessary
|
||||||
# pubkey in the pubkeys table.
|
# pubkey in the pubkeys table.
|
||||||
|
|
||||||
TTL *= 2**retryNumber
|
TTL *= 2**retryNumber
|
||||||
|
|
Reference in New Issue
Block a user