From 611eb9db875997aeeb15db71975187c204bdda21 Mon Sep 17 00:00:00 2001 From: Mahendra Date: Mon, 19 Mar 2018 19:14:24 +0530 Subject: [PATCH] Fixed unreachable code issue --- src/addresses.py | 11 ++++++----- src/class_singleWorker.py | 2 +- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/addresses.py b/src/addresses.py index 073e9847..ac79a8ef 100644 --- a/src/addresses.py +++ b/src/addresses.py @@ -51,7 +51,6 @@ def decodeBase58(string, alphabet=ALPHABET): """ base = len(alphabet) num = 0 - try: for char in string: num *= base @@ -253,12 +252,14 @@ def decodeAddress(address): embeddedRipeData = data[bytesUsedByVersionNumber + bytesUsedByStreamNumber:-4] if len(embeddedRipeData) == 19: - return status, addressVersionNumber, streamNumber, '\x00' + embeddedRipeData + return status, addressVersionNumber, streamNumber, \ + '\x00', embeddedRipeData elif len(embeddedRipeData) == 20: - return status, addressVersionNumber, streamNumber, embeddedRipeData + return status, addressVersionNumber, streamNumber, \ + embeddedRipeData elif len(embeddedRipeData) == 18: - return status, addressVersionNumber, streamNumber, '\x00\x00' - + embeddedRipeData + return status, addressVersionNumber, streamNumber, \ + '\x00\x00', embeddedRipeData elif len(embeddedRipeData) < 18: return 'ripetooshort', 0, 0, "" elif len(embeddedRipeData) > 20: diff --git a/src/class_singleWorker.py b/src/class_singleWorker.py index 608337fa..f9d9a4a7 100644 --- a/src/class_singleWorker.py +++ b/src/class_singleWorker.py @@ -799,7 +799,7 @@ class singleWorker(threading.Thread, StoppableThread): self.requestPubKey(toaddress) continue # 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. TTL *= 2**retryNumber