mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-29 00:11:36 +00:00
after rebase fixes
This commit is contained in:
parent
06f24fd11a
commit
dbb482a512
4 changed files with 8 additions and 8 deletions
|
@ -2064,7 +2064,6 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, PrintError):
|
||||||
'wallet': self.wallet,
|
'wallet': self.wallet,
|
||||||
'network': self.network,
|
'network': self.network,
|
||||||
'plugins': self.gui_object.plugins,
|
'plugins': self.gui_object.plugins,
|
||||||
'lightning' : self.wallet.lnworker.console_interface,
|
|
||||||
'window': self,
|
'window': self,
|
||||||
'config': self.config,
|
'config': self.config,
|
||||||
'electrum': electrum,
|
'electrum': electrum,
|
||||||
|
|
|
@ -32,12 +32,12 @@ from .lnutil import (Outpoint, LocalConfig, ChannelConfig,
|
||||||
secret_to_pubkey, LNPeerAddr, PaymentFailure, LnLocalFeatures,
|
secret_to_pubkey, LNPeerAddr, PaymentFailure, LnLocalFeatures,
|
||||||
LOCAL, REMOTE, HTLCOwner, generate_keypair, LnKeyFamily,
|
LOCAL, REMOTE, HTLCOwner, generate_keypair, LnKeyFamily,
|
||||||
get_ln_flag_pair_of_bit, privkey_to_pubkey, UnknownPaymentHash, MIN_FINAL_CLTV_EXPIRY_ACCEPTED,
|
get_ln_flag_pair_of_bit, privkey_to_pubkey, UnknownPaymentHash, MIN_FINAL_CLTV_EXPIRY_ACCEPTED,
|
||||||
LightningPeerConnectionClosed, HandshakeFailed, LNPeerAddr)
|
LightningPeerConnectionClosed, HandshakeFailed, LNPeerAddr, NotFoundChanAnnouncementForUpdate)
|
||||||
from .lnrouter import NotFoundChanAnnouncementForUpdate, RouteEdge
|
|
||||||
from .lntransport import LNTransport, LNTransportBase
|
from .lntransport import LNTransport, LNTransportBase
|
||||||
|
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from .lnworker import LNWorker
|
from .lnworker import LNWorker
|
||||||
|
from .lnrouter import RouteEdge
|
||||||
|
|
||||||
|
|
||||||
def channel_id_from_funding_tx(funding_txid: str, funding_index: int) -> Tuple[bytes, bytes]:
|
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)
|
await self.receive_revoke(chan)
|
||||||
self.network.trigger_callback('ln_message', self.lnworker, 'Payment failed')
|
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]
|
chan = self.channels[channel_id]
|
||||||
failure_msg, sender_idx = decode_onion_error(error_reason,
|
failure_msg, sender_idx = decode_onion_error(error_reason,
|
||||||
[x.node_id for x in route],
|
[x.node_id for x in route],
|
||||||
|
@ -962,7 +962,7 @@ class Peer(PrintError):
|
||||||
await self.receive_commitment(chan)
|
await self.receive_commitment(chan)
|
||||||
self.revoke(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):
|
payment_hash: bytes, min_final_cltv_expiry: int):
|
||||||
assert chan.get_state() == "OPEN", chan.get_state()
|
assert chan.get_state() == "OPEN", chan.get_state()
|
||||||
assert amount_msat > 0, "amount_msat is not greater zero"
|
assert amount_msat > 0, "amount_msat is not greater zero"
|
||||||
|
|
|
@ -39,7 +39,8 @@ from .storage import JsonDB
|
||||||
from .lnchannelverifier import LNChannelVerifier, verify_sig_for_channel_update
|
from .lnchannelverifier import LNChannelVerifier, verify_sig_for_channel_update
|
||||||
from .crypto import sha256d
|
from .crypto import sha256d
|
||||||
from . import ecc
|
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:
|
if TYPE_CHECKING:
|
||||||
from .lnchan import Channel
|
from .lnchan import Channel
|
||||||
|
@ -49,8 +50,6 @@ if TYPE_CHECKING:
|
||||||
class UnknownEvenFeatureBits(Exception): pass
|
class UnknownEvenFeatureBits(Exception): pass
|
||||||
|
|
||||||
|
|
||||||
class NotFoundChanAnnouncementForUpdate(Exception): pass
|
|
||||||
|
|
||||||
|
|
||||||
class ChannelInfo(PrintError):
|
class ChannelInfo(PrintError):
|
||||||
|
|
||||||
|
|
|
@ -72,6 +72,8 @@ class ConnStringFormatError(LightningError): pass
|
||||||
class UnknownPaymentHash(LightningError): pass
|
class UnknownPaymentHash(LightningError): pass
|
||||||
class RemoteMisbehaving(LightningError): pass
|
class RemoteMisbehaving(LightningError): pass
|
||||||
|
|
||||||
|
class NotFoundChanAnnouncementForUpdate(Exception): pass
|
||||||
|
|
||||||
|
|
||||||
# TODO make configurable?
|
# TODO make configurable?
|
||||||
MIN_FINAL_CLTV_EXPIRY_ACCEPTED = 144
|
MIN_FINAL_CLTV_EXPIRY_ACCEPTED = 144
|
||||||
|
|
Loading…
Add table
Reference in a new issue