electrum

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

commit 5b7c801ca44a1c2323953abcc19c120058f127fc
parent 8a98810df15a78ef5d78ea3c4ea7a69a1bb98c19
Author: SomberNight <somber.night@protonmail.com>
Date:   Mon,  5 Nov 2018 20:29:44 +0100

after rebase fixes

Diffstat:
Melectrum/gui/qt/main_window.py | 1-
Melectrum/lnbase.py | 8++++----
Melectrum/lnrouter.py | 5++---
Melectrum/lnutil.py | 2++
4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/electrum/gui/qt/main_window.py b/electrum/gui/qt/main_window.py @@ -2178,7 +2178,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger): 'wallet': self.wallet, 'network': self.network, 'plugins': self.gui_object.plugins, - 'lightning' : self.wallet.lnworker.console_interface, 'window': self, 'config': self.config, 'electrum': electrum, diff --git a/electrum/lnbase.py b/electrum/lnbase.py @@ -32,12 +32,12 @@ from .lnutil import (Outpoint, LocalConfig, ChannelConfig, secret_to_pubkey, LNPeerAddr, PaymentFailure, LnLocalFeatures, LOCAL, REMOTE, HTLCOwner, generate_keypair, LnKeyFamily, get_ln_flag_pair_of_bit, privkey_to_pubkey, UnknownPaymentHash, MIN_FINAL_CLTV_EXPIRY_ACCEPTED, - LightningPeerConnectionClosed, HandshakeFailed, LNPeerAddr) -from .lnrouter import NotFoundChanAnnouncementForUpdate, RouteEdge + LightningPeerConnectionClosed, HandshakeFailed, LNPeerAddr, NotFoundChanAnnouncementForUpdate) from .lntransport import LNTransport, LNTransportBase if TYPE_CHECKING: from .lnworker import LNWorker + from .lnrouter import RouteEdge def channel_id_from_funding_tx(funding_txid: str, funding_index: int) -> Tuple[bytes, bytes]: @@ -908,7 +908,7 @@ class Peer(PrintError): await self.receive_revoke(chan) self.network.trigger_callback('ln_message', self.lnworker, 'Payment failed') - async def _handle_error_code_from_failed_htlc(self, error_reason, route: List[RouteEdge], channel_id, htlc_id): + async def _handle_error_code_from_failed_htlc(self, error_reason, route: List['RouteEdge'], channel_id, htlc_id): chan = self.channels[channel_id] failure_msg, sender_idx = decode_onion_error(error_reason, [x.node_id for x in route], @@ -962,7 +962,7 @@ class Peer(PrintError): await self.receive_commitment(chan) self.revoke(chan) - async def pay(self, route: List[RouteEdge], chan: Channel, amount_msat: int, + async def pay(self, route: List['RouteEdge'], chan: Channel, amount_msat: int, payment_hash: bytes, min_final_cltv_expiry: int): assert chan.get_state() == "OPEN", chan.get_state() assert amount_msat > 0, "amount_msat is not greater zero" diff --git a/electrum/lnrouter.py b/electrum/lnrouter.py @@ -39,7 +39,8 @@ from .storage import JsonDB from .lnchannelverifier 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 +from .lnutil import (LN_GLOBAL_FEATURES_KNOWN_SET, LNPeerAddr, NUM_MAX_EDGES_IN_PAYMENT_PATH, + NotFoundChanAnnouncementForUpdate) if TYPE_CHECKING: from .lnchan import Channel @@ -49,8 +50,6 @@ if TYPE_CHECKING: class UnknownEvenFeatureBits(Exception): pass -class NotFoundChanAnnouncementForUpdate(Exception): pass - class ChannelInfo(PrintError): diff --git a/electrum/lnutil.py b/electrum/lnutil.py @@ -72,6 +72,8 @@ class ConnStringFormatError(LightningError): pass class UnknownPaymentHash(LightningError): pass class RemoteMisbehaving(LightningError): pass +class NotFoundChanAnnouncementForUpdate(Exception): pass + # TODO make configurable? MIN_FINAL_CLTV_EXPIRY_ACCEPTED = 144