persist channel db on disk. verify channel gossip sigs.
This commit is contained in:
@@ -301,7 +301,7 @@ class Network(Logger):
|
||||
|
||||
# lightning network
|
||||
self.lightning_nodes = {}
|
||||
self.channel_db = lnrouter.ChannelDB()
|
||||
self.channel_db = lnrouter.ChannelDB(self)
|
||||
self.path_finder = lnrouter.LNPathFinder(self.channel_db)
|
||||
self.lnwatcher = lnwatcher.LNWatcher(self)
|
||||
|
||||
@@ -1183,6 +1183,7 @@ class Network(Logger):
|
||||
def stop(self):
|
||||
assert self._loop_thread != threading.current_thread(), 'must not be called from network thread'
|
||||
fut = asyncio.run_coroutine_threadsafe(self._stop(full_shutdown=True), self.asyncio_loop)
|
||||
self.channel_db.save_data()
|
||||
try:
|
||||
fut.result(timeout=2)
|
||||
except (asyncio.TimeoutError, asyncio.CancelledError): pass
|
||||
|
||||
Reference in New Issue
Block a user