LN cooperative close: avoid address-reuse (#6590)
Previously if we coop-closed multiple channels in the same session, they would reuse the wallet address.
This commit is contained in:
@@ -494,7 +494,8 @@ class LNWallet(LNWorker):
|
||||
self.features |= LnFeatures.OPTION_STATIC_REMOTEKEY_REQ
|
||||
self.payments = self.db.get_dict('lightning_payments') # RHASH -> amount, direction, is_paid # FIXME amt should be msat
|
||||
self.preimages = self.db.get_dict('lightning_preimages') # RHASH -> preimage
|
||||
self.sweep_address = wallet.get_new_sweep_address_for_channel() # TODO possible address-reuse
|
||||
# note: this sweep_address is only used as fallback; as it might result in address-reuse
|
||||
self.sweep_address = wallet.get_new_sweep_address_for_channel()
|
||||
self.logs = defaultdict(list) # type: Dict[str, List[PaymentAttemptLog]] # key is RHASH # (not persisted)
|
||||
self.is_routing = set() # (not persisted) keys of invoices that are in PR_ROUTING state
|
||||
# used in tests
|
||||
|
||||
Reference in New Issue
Block a user