tlnpeer: await on_message handlers to raise exceptions - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 863fe031f0e9dfa5376b78354e554a317c3b2d90
DIR parent 2eb02931aea1d4bf0c869284959bdb9b584f19f4
HTML Author: bitromortac <bitromortac@protonmail.com>
Date: Fri, 1 Jan 2021 10:12:07 +0100
lnpeer: await on_message handlers to raise exceptions
Diffstat:
M electrum/lnpeer.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
DIR diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py
t@@ -193,7 +193,7 @@ class Peer(Logger):
payload['raw'] = message
execution_result = f(*args)
if asyncio.iscoroutinefunction(f):
- asyncio.ensure_future(execution_result)
+ asyncio.ensure_future(self.taskgroup.spawn(execution_result))
def on_error(self, payload):
self.logger.info(f"remote peer sent error [DO NOT TRUST THIS MESSAGE]: {payload['data'].decode('ascii')}")
t@@ -1405,7 +1405,6 @@ class Peer(Logger):
self.logger.info(f'({chan.get_id_for_log()}) Channel closed {txid}')
return txid
- @log_exceptions
async def on_shutdown(self, chan: Channel, payload):
their_scriptpubkey = payload['scriptpubkey']
# BOLT-02 restrict the scriptpubkey to some templates: