Use separate lightning nodes for gossip and channel operations.
This commit is contained in:
@@ -298,10 +298,12 @@ class Network(Logger):
|
||||
|
||||
# lightning network
|
||||
from . import lnwatcher
|
||||
from . import lnworker
|
||||
from . import lnrouter
|
||||
self.channel_db = lnrouter.ChannelDB(self)
|
||||
self.path_finder = lnrouter.LNPathFinder(self.channel_db)
|
||||
self.lnwatcher = lnwatcher.LNWatcher(self)
|
||||
self.lngossip = lnworker.LNGossip(self)
|
||||
|
||||
def run_from_another_thread(self, coro):
|
||||
assert self._loop_thread != threading.current_thread(), 'must not be called from network thread'
|
||||
@@ -1158,6 +1160,8 @@ class Network(Logger):
|
||||
asyncio.run_coroutine_threadsafe(main(), self.asyncio_loop)
|
||||
|
||||
self.trigger_callback('network_updated')
|
||||
#
|
||||
self.lngossip.start_network(self)
|
||||
|
||||
def start(self, jobs: List=None):
|
||||
self._jobs = jobs or []
|
||||
|
||||
Reference in New Issue
Block a user