From f2d3b69bf83f495a9deb7134c0c67a267a1c4062 Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Wed, 6 Mar 2019 19:04:04 +0200 Subject: [PATCH] Removed another copy of unused convertIntToString() from addresses --- src/addresses.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/addresses.py b/src/addresses.py index 510b0ce6..533ec169 100644 --- a/src/addresses.py +++ b/src/addresses.py @@ -5,23 +5,11 @@ src/addresses.py """ # pylint: disable=redefined-outer-name,inconsistent-return-statements -from __future__ import print_function import hashlib from binascii import hexlify, unhexlify from struct import pack, unpack from debug import logger -from pyelliptic import arithmetic - - -def convertIntToString(n): - """.. todo:: There is another copy of this function in Bitmessagemain.py""" - a = __builtins__.hex(n) - if a[-1:] == 'L': - a = a[:-1] - if len(a) % 2 == 0: - return unhexlify(a[2:]) - return unhexlify('0' + a[2:]) ALPHABET = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz" @@ -288,7 +276,10 @@ def addBMIfNotPresent(address): return address if address[:3] == 'BM-' else 'BM-' + address +# TODO: make test case if __name__ == "__main__": + from pyelliptic import arithmetic + print( '\nLet us make an address from scratch. Suppose we generate two' ' random 32 byte values and call the first one the signing key'