Removed another copy of unused convertIntToString() from addresses

This commit is contained in:
Dmitri Bogomolov 2019-03-06 19:04:04 +02:00
parent 3ec798bcfb
commit f2d3b69bf8
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -5,23 +5,11 @@ src/
# 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"""
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
'\nLet us make an address from scratch. Suppose we generate two'
' random 32 byte values and call the first one the signing key'