1
0

lnworker: use booleans for enable_htlc_settle, enable_htlc_forwarding

This commit is contained in:
ThomasV
2021-03-18 07:48:30 +01:00
parent e5686c8dc5
commit 8a051dcd76
4 changed files with 18 additions and 20 deletions

View File

@@ -602,10 +602,8 @@ class LNWallet(LNWorker):
self.sweep_address = wallet.get_new_sweep_address_for_channel()
self.logs = defaultdict(list) # type: Dict[str, List[HtlcLog]] # key is RHASH # (not persisted)
# used in tests
self.enable_htlc_settle = asyncio.Event()
self.enable_htlc_settle.set()
self.enable_htlc_forwarding = asyncio.Event()
self.enable_htlc_forwarding.set()
self.enable_htlc_settle = True
self.enable_htlc_forwarding = True
# note: accessing channels (besides simple lookup) needs self.lock!
self._channels = {} # type: Dict[bytes, Channel]