Browse Source

add_own_channel does not need to be async

dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
ThomasV 5 years ago
parent
commit
e286ed1c13
  1. 2
      electrum/channel_db.py
  2. 4
      electrum/lnpeer.py

2
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()

4
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))

Loading…
Cancel
Save