electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit d9552858085969feaf2ead1cd280e1eaefa30d48
parent 47ee02569af047d803592c43277ffb053a547bd7
Author: SomberNight <somber.night@protonmail.com>
Date:   Fri, 16 Aug 2019 22:37:33 +0200

lnrouter/channeldb: small import clean-up

Diffstat:
Melectrum/channel_db.py | 17+++--------------
Melectrum/lnrouter.py | 24++++--------------------
2 files changed, 7 insertions(+), 34 deletions(-)

diff --git a/electrum/channel_db.py b/electrum/channel_db.py @@ -23,14 +23,9 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from datetime import datetime import time import random -import queue import os -import json -import threading -import concurrent from collections import defaultdict from typing import Sequence, List, Tuple, Optional, Dict, NamedTuple, TYPE_CHECKING, Set import binascii @@ -39,21 +34,15 @@ import base64 from .sql_db import SqlDB, sql from . import constants -from .util import bh2u, profiler, get_headers_dir, bfh, is_ip_address, list_enabled_bits, print_msg, chunks +from .util import bh2u, profiler, get_headers_dir, bfh, is_ip_address, list_enabled_bits from .logging import Logger -from .storage import JsonDB +from .lnutil import LN_GLOBAL_FEATURES_KNOWN_SET, LNPeerAddr from .lnverifier import LNChannelVerifier, verify_sig_for_channel_update -from .crypto import sha256d -from . import ecc -from .lnutil import (LN_GLOBAL_FEATURES_KNOWN_SET, LNPeerAddr, NUM_MAX_EDGES_IN_PAYMENT_PATH, - NotFoundChanAnnouncementForUpdate) -from .lnverifier import verify_sig_for_channel_update -from .lnmsg import encode_msg if TYPE_CHECKING: - from .lnchannel import Channel from .network import Network + class UnknownEvenFeatureBits(Exception): pass def validate_features(features : int): diff --git a/electrum/lnrouter.py b/electrum/lnrouter.py @@ -23,34 +23,18 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from datetime import datetime -import time -import random import queue -import os -import json -import threading -import concurrent from collections import defaultdict from typing import Sequence, List, Tuple, Optional, Dict, NamedTuple, TYPE_CHECKING, Set -import binascii -import base64 -from . import constants -from .util import bh2u, profiler, get_headers_dir, is_ip_address, list_enabled_bits, print_msg, chunks +from .util import bh2u, profiler from .logging import Logger -from .storage import JsonDB -from .lnverifier import LNChannelVerifier, verify_sig_for_channel_update -from .crypto import sha256d -from . import ecc -from .lnutil import (LN_GLOBAL_FEATURES_KNOWN_SET, LNPeerAddr, NUM_MAX_EDGES_IN_PAYMENT_PATH, - NotFoundChanAnnouncementForUpdate) -from .lnmsg import encode_msg -from .channel_db import ChannelDB +from .lnutil import NUM_MAX_EDGES_IN_PAYMENT_PATH +from .channel_db import ChannelDB, Policy if TYPE_CHECKING: from .lnchannel import Channel - from .network import Network + class NoChannelPolicy(Exception): def __init__(self, short_channel_id: bytes):