From 9cad00cc8a92a9f024cf87f0dd29b19f80f7b482 Mon Sep 17 00:00:00 2001 From: Janus Date: Fri, 29 Jun 2018 13:31:42 +0100 Subject: [PATCH] lnaddr: fix imports --- lib/lnaddr.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/lnaddr.py b/lib/lnaddr.py index f3151f807..ff48823ac 100755 --- a/lib/lnaddr.py +++ b/lib/lnaddr.py @@ -1,19 +1,15 @@ #! /usr/bin/env python3 # This was forked from https://github.com/rustyrussell/lightning-payencode/tree/acc16ec13a3fa1dc16c07af6ec67c261bd8aff23 -import ecdsa.curves -from ecdsa.ecdsa import generator_secp256k1 -from ..bitcoin import hash160_to_b58_address, b58_address_to_hash160 +from .bitcoin import hash160_to_b58_address, b58_address_to_hash160 from hashlib import sha256 -from ..segwit_addr import bech32_encode, bech32_decode, CHARSET -from binascii import hexlify, unhexlify -from bitstring import BitArray +from .segwit_addr import bech32_encode, bech32_decode, CHARSET +from binascii import hexlify from decimal import Decimal -from .. import constants +from . import constants -from .. import ecc +from . import ecc import bitstring -import hashlib import re import time @@ -266,7 +262,7 @@ def lndecode(a, verbose=False, expected_hrp=constants.net.SEGWIT_HRP): if not hrp[2:].startswith(expected_hrp): raise ValueError("Wrong Lightning invoice HRP " + hrp[2:] + ", should be " + expected_hrp) - data = u5_to_bitarray(data); + data = u5_to_bitarray(data) # Final signature 65 bytes, split it off. if len(data) < 65*8: