commit 6b9de278d4eb5c67a2589950c15eeb2801236984
parent 6f3c2b30edab034c7d0cb93c6ce4d8e124f55a17
Author: ThomasV <thomasv@electrum.org>
Date: Mon, 8 Oct 2018 10:08:39 +0200
aiosafe: define user visible exception class
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/electrum/gui/qt/channels_list.py b/electrum/gui/qt/channels_list.py
@@ -113,9 +113,7 @@ class ChannelsList(MyTreeWidget):
self.main_window.protect(self.open_channel, (connect_contents, local_amt, push_amt))
def open_channel(self, *args, **kwargs):
- import traceback, sys
try:
self.parent.wallet.lnworker.open_channel(*args, **kwargs)
except Exception as e:
- traceback.print_exc(file=sys.stderr)
self.parent.show_error('Cannot open channel: %s' % str(e))
diff --git a/electrum/lnbase.py b/electrum/lnbase.py
@@ -21,7 +21,7 @@ from . import ecc
from .ecc import sig_string_from_r_and_s, get_r_and_s_from_sig_string
from .crypto import sha256
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 .lnonion import new_onion_packet, OnionHopsDataSingle, OnionPerHop, decode_onion_error, ONION_FAILURE_CODE_MAP
from .lnaddr import lndecode
@@ -524,6 +524,7 @@ class Peer(PrintError):
per_commitment_secret_seed = keypair_generator(LnKeyFamily.REVOCATION_ROOT).privkey
return local_config, per_commitment_secret_seed
+ @log_exceptions
async def channel_establishment_flow(self, password, funding_sat, push_msat, temp_channel_id):
await self.initialized
local_config, per_commitment_secret_seed = self.make_local_config(funding_sat, push_msat, LOCAL)