mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-05 05:15:12 +00:00
aiosafe: define user visible exception class
This commit is contained in:
parent
6f3c2b30ed
commit
6b9de278d4
2 changed files with 2 additions and 3 deletions
|
@ -113,9 +113,7 @@ class ChannelsList(MyTreeWidget):
|
||||||
self.main_window.protect(self.open_channel, (connect_contents, local_amt, push_amt))
|
self.main_window.protect(self.open_channel, (connect_contents, local_amt, push_amt))
|
||||||
|
|
||||||
def open_channel(self, *args, **kwargs):
|
def open_channel(self, *args, **kwargs):
|
||||||
import traceback, sys
|
|
||||||
try:
|
try:
|
||||||
self.parent.wallet.lnworker.open_channel(*args, **kwargs)
|
self.parent.wallet.lnworker.open_channel(*args, **kwargs)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
traceback.print_exc(file=sys.stderr)
|
|
||||||
self.parent.show_error('Cannot open channel: %s' % str(e))
|
self.parent.show_error('Cannot open channel: %s' % str(e))
|
||||||
|
|
|
@ -21,7 +21,7 @@ from . import ecc
|
||||||
from .ecc import sig_string_from_r_and_s, get_r_and_s_from_sig_string
|
from .ecc import sig_string_from_r_and_s, get_r_and_s_from_sig_string
|
||||||
from .crypto import sha256
|
from .crypto import sha256
|
||||||
from . import constants
|
from . import constants
|
||||||
from .util import PrintError, bh2u, print_error, bfh, aiosafe
|
from .util import PrintError, bh2u, print_error, bfh, log_exceptions
|
||||||
from .transaction import Transaction, TxOutput
|
from .transaction import Transaction, TxOutput
|
||||||
from .lnonion import new_onion_packet, OnionHopsDataSingle, OnionPerHop, decode_onion_error, ONION_FAILURE_CODE_MAP
|
from .lnonion import new_onion_packet, OnionHopsDataSingle, OnionPerHop, decode_onion_error, ONION_FAILURE_CODE_MAP
|
||||||
from .lnaddr import lndecode
|
from .lnaddr import lndecode
|
||||||
|
@ -524,6 +524,7 @@ class Peer(PrintError):
|
||||||
per_commitment_secret_seed = keypair_generator(LnKeyFamily.REVOCATION_ROOT).privkey
|
per_commitment_secret_seed = keypair_generator(LnKeyFamily.REVOCATION_ROOT).privkey
|
||||||
return local_config, per_commitment_secret_seed
|
return local_config, per_commitment_secret_seed
|
||||||
|
|
||||||
|
@log_exceptions
|
||||||
async def channel_establishment_flow(self, password, funding_sat, push_msat, temp_channel_id):
|
async def channel_establishment_flow(self, password, funding_sat, push_msat, temp_channel_id):
|
||||||
await self.initialized
|
await self.initialized
|
||||||
local_config, per_commitment_secret_seed = self.make_local_config(funding_sat, push_msat, LOCAL)
|
local_config, per_commitment_secret_seed = self.make_local_config(funding_sat, push_msat, LOCAL)
|
||||||
|
|
Loading…
Add table
Reference in a new issue