1
0

submarine swaps: register callbacks on startup

This commit is contained in:
ThomasV
2023-08-09 14:15:49 +02:00
parent bf86cd6761
commit 1ce50b9dee
2 changed files with 3 additions and 1 deletions

View File

@@ -152,6 +152,8 @@ class SwapManager(Logger):
for payment_hash, swap in self.swaps.items():
swap._payment_hash = bytes.fromhex(payment_hash)
self._add_or_reindex_swap(swap)
if not swap.is_reverse and not swap.is_redeemed:
self.lnworker.register_callback_for_hold_invoice(payment_hash, self.hold_invoice_callback)
self.prepayments = {} # type: Dict[bytes, bytes] # fee_rhash -> rhash
for k, swap in self.swaps.items():