commit e286ed1c1385d934107a90e1e2edc35e7c6d2ffe
parent 9372eacc291ab3fb35c762eba0341d95571863ff
Author: ThomasV <thomasv@electrum.org>
Date: Tue, 3 Sep 2019 21:01:45 +0200
add_own_channel does not need to be async
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/electrum/channel_db.py b/electrum/channel_db.py
@@ -378,7 +378,7 @@ class ChannelDB(SqlDB):
def add_channel_update(self, payload):
categorized_chan_upds = self.add_channel_updates([payload], verify=False)
- assert len(categorized_chan_upds.good) == 1
+ assert len(categorized_chan_upds.good) == 1, categorized_chan_upds
def create_database(self):
c = self.conn.cursor()
diff --git a/electrum/lnpeer.py b/electrum/lnpeer.py
@@ -962,7 +962,7 @@ class Peer(Logger):
assert chan.config[LOCAL].funding_locked_received
chan.set_state("OPEN")
self.network.trigger_callback('channel', chan)
- asyncio.ensure_future(self.add_own_channel(chan))
+ self.add_own_channel(chan)
self.logger.info(f"CHANNEL OPENING COMPLETED for {scid}")
forwarding_enabled = self.network.config.get('lightning_forward_payments', False)
if forwarding_enabled:
@@ -972,7 +972,7 @@ class Peer(Logger):
chan_upd = self.get_outgoing_gossip_channel_update_for_chan(chan)
self.transport.send_bytes(chan_upd)
- async def add_own_channel(self, chan):
+ def add_own_channel(self, chan):
# add channel to database
bitcoin_keys = [chan.config[LOCAL].multisig_key.pubkey, chan.config[REMOTE].multisig_key.pubkey]
sorted_node_ids = list(sorted(self.node_ids))