electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 0b183444b46e6bf26622e8b41368004a73357dee
parent 13563697f53e4660aad29b10b3e91abd43c27955
Author: ThomasV <thomasv@electrum.org>
Date:   Fri, 20 Nov 2020 08:35:57 +0100

Rename maybe_init_lightning(). Call load_data() from there

Diffstat:
Melectrum/daemon.py | 3+--
Melectrum/network.py | 3++-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/electrum/daemon.py b/electrum/daemon.py @@ -448,8 +448,7 @@ class Daemon(Logger): if self.network: self.network.start(jobs=[self.fx.run]) # prepare lightning functionality, also load channel db early - self.network.maybe_init_lightning() - self.network.channel_db.load_data() + self.network.init_channel_db() self.taskgroup = TaskGroup() asyncio.run_coroutine_threadsafe(self._run(jobs=daemon_jobs), self.asyncio_loop) diff --git a/electrum/network.py b/electrum/network.py @@ -347,12 +347,13 @@ class Network(Logger, NetworkRetryManager[ServerAddr]): def has_channel_db(self): return self.channel_db is not None - def maybe_init_lightning(self): + def init_channel_db(self): if self.channel_db is None: from . import lnrouter from . import channel_db self.channel_db = channel_db.ChannelDB(self) self.path_finder = lnrouter.LNPathFinder(self.channel_db) + self.channel_db.load_data() def start_gossip(self): if self.lngossip is None: