1
0

wallet/lnworker/etc: add sanity checks to start_network methods

related: https://github.com/spesmilo/electrum/issues/8301
This commit is contained in:
SomberNight
2023-04-17 16:56:57 +00:00
parent a03f4769ca
commit 6ac3f84095
4 changed files with 8 additions and 4 deletions

View File

@@ -182,6 +182,7 @@ class AddressSynchronizer(Logger, EventListener):
self.add_unverified_or_unconfirmed_tx(tx_hash, tx_height)
def start_network(self, network: Optional['Network']) -> None:
assert self.network is None, "already started"
self.network = network
if self.network is not None:
self.synchronizer = Synchronizer(self)