Browse Source

after rebase fixes

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight 6 years ago
committed by ThomasV
parent
commit
5b7c801ca4
  1. 1
      electrum/gui/qt/main_window.py
  2. 8
      electrum/lnbase.py
  3. 5
      electrum/lnrouter.py
  4. 2
      electrum/lnutil.py

1
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,

8
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"

5
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):

2
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

Loading…
Cancel
Save