Browse Source

lnworker: move NoPathFound to lnutil

patch-4
bitromortac 4 years ago
parent
commit
3ddb83fad3
No known key found for this signature in database GPG Key ID: 1965063FC13BEBE2
  1. 3
      electrum/lnutil.py
  2. 8
      electrum/lnworker.py

3
electrum/lnutil.py

@ -290,6 +290,9 @@ class UpfrontShutdownScriptViolation(RemoteMisbehaving): pass
class NotFoundChanAnnouncementForUpdate(Exception): pass
class PaymentFailure(UserFacingException): pass
class NoPathFound(PaymentFailure):
def __str__(self):
return _('No path found')
# TODO make some of these values configurable?
REDEEM_AFTER_DOUBLE_SPENT_DELAY = 30

8
electrum/lnworker.py

@ -56,7 +56,8 @@ from .lnutil import (Outpoint, LNPeerAddr,
MIN_FINAL_CLTV_EXPIRY_FOR_INVOICE,
NUM_MAX_EDGES_IN_PAYMENT_PATH, SENT, RECEIVED, HTLCOwner,
UpdateAddHtlc, Direction, LnFeatures, ShortChannelID,
HtlcLog, derive_payment_secret_from_payment_preimage)
HtlcLog, derive_payment_secret_from_payment_preimage,
NoPathFound)
from .lnutil import ln_dummy_address, ln_compare_features, IncompatibleLightningFeatures
from .lnrouter import TrampolineEdge
from .transaction import PartialTxOutput, PartialTransaction, PartialTxInput
@ -199,11 +200,6 @@ class PaymentInfo(NamedTuple):
status: int
class NoPathFound(PaymentFailure):
def __str__(self):
return _('No path found')
class ErrorAddingPeer(Exception): pass

Loading…
Cancel
Save