mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-06 02:29:55 +00:00
gather definitions of LN exceptions
This commit is contained in:
parent
409a336071
commit
a0acec9720
2 changed files with 7 additions and 15 deletions
|
@ -62,6 +62,7 @@ from electrum.util import (format_time, format_satoshis, format_fee_satoshis,
|
||||||
UnknownBaseUnit, DECIMAL_POINT_DEFAULT, UserFacingException,
|
UnknownBaseUnit, DECIMAL_POINT_DEFAULT, UserFacingException,
|
||||||
get_new_wallet_name, send_exception_to_crash_reporter,
|
get_new_wallet_name, send_exception_to_crash_reporter,
|
||||||
InvalidBitcoinURI, InvoiceError)
|
InvalidBitcoinURI, InvoiceError)
|
||||||
|
from electrum.lnutil import PaymentFailure
|
||||||
from electrum.transaction import Transaction, TxOutput
|
from electrum.transaction import Transaction, TxOutput
|
||||||
from electrum.address_synchronizer import AddTransactionException
|
from electrum.address_synchronizer import AddTransactionException
|
||||||
from electrum.wallet import (Multisig_Wallet, CannotBumpFee, Abstract_Wallet,
|
from electrum.wallet import (Multisig_Wallet, CannotBumpFee, Abstract_Wallet,
|
||||||
|
|
|
@ -57,17 +57,12 @@ class Outpoint(NamedTuple("Outpoint", [('txid', str), ('output_index', int)])):
|
||||||
return "{}:{}".format(self.txid, self.output_index)
|
return "{}:{}".format(self.txid, self.output_index)
|
||||||
|
|
||||||
|
|
||||||
class LightningError(Exception):
|
class LightningError(Exception): pass
|
||||||
pass
|
class LightningPeerConnectionClosed(LightningError): pass
|
||||||
|
class UnableToDeriveSecret(LightningError): pass
|
||||||
class LightningPeerConnectionClosed(LightningError):
|
class HandshakeFailed(LightningError): pass
|
||||||
pass
|
class PaymentFailure(LightningError): pass
|
||||||
|
class ConnStringFormatError(LightningError): pass
|
||||||
class UnableToDeriveSecret(LightningError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
class HandshakeFailed(LightningError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
class RevocationStore:
|
class RevocationStore:
|
||||||
|
@ -516,8 +511,6 @@ def get_compressed_pubkey_from_bech32(bech32_pubkey: str) -> bytes:
|
||||||
return bytes(data_8bits)
|
return bytes(data_8bits)
|
||||||
|
|
||||||
|
|
||||||
class PaymentFailure(Exception): pass
|
|
||||||
|
|
||||||
class HTLCOwner(IntFlag):
|
class HTLCOwner(IntFlag):
|
||||||
LOCAL = 1
|
LOCAL = 1
|
||||||
REMOTE = -LOCAL
|
REMOTE = -LOCAL
|
||||||
|
@ -540,8 +533,6 @@ def make_closing_tx(local_funding_pubkey: bytes, remote_funding_pubkey: bytes,
|
||||||
tx = Transaction.from_io([c_input], outputs, locktime=0, version=2)
|
tx = Transaction.from_io([c_input], outputs, locktime=0, version=2)
|
||||||
return tx
|
return tx
|
||||||
|
|
||||||
class ConnStringFormatError(Exception):
|
|
||||||
pass
|
|
||||||
|
|
||||||
def split_host_port(host_port: str) -> Tuple[str, str]: # port returned as string
|
def split_host_port(host_port: str) -> Tuple[str, str]: # port returned as string
|
||||||
ipv6 = re.compile(r'\[(?P<host>[:0-9]+)\](?P<port>:\d+)?$')
|
ipv6 = re.compile(r'\[(?P<host>[:0-9]+)\](?P<port>:\d+)?$')
|
||||||
|
|
Loading…
Add table
Reference in a new issue