1
0

lightning: enable by default but without gossip

Enables lightning by creating a node private key and storing it in
the wallet. The gossiper is not launched at start up, only if there
are existing channels.
This commit is contained in:
bitromortac
2020-10-02 07:39:36 +02:00
committed by ThomasV
parent edc593a886
commit 6045de759b
4 changed files with 30 additions and 6 deletions

View File

@@ -355,7 +355,12 @@ class Network(Logger, NetworkRetryManager[ServerAddr]):
self.channel_db = channel_db.ChannelDB(self)
self.path_finder = lnrouter.LNPathFinder(self.channel_db)
self.lngossip = lnworker.LNGossip()
self.lngossip.start_network(self)
def start_gossip(self):
self.lngossip.start_network(self)
def stop_gossip(self):
self.lngossip.stop()
def run_from_another_thread(self, coro, *, timeout=None):
assert self._loop_thread != threading.current_thread(), 'must not be called from network thread'