1
0

amchor outputs: fixes after rebase

This commit is contained in:
ThomasV
2024-11-23 11:25:32 +01:00
parent efa239cc9b
commit 78d19c6e2f
2 changed files with 7 additions and 6 deletions

View File

@@ -892,9 +892,11 @@ class Channel(AbstractChannel):
def get_sweep_address(self) -> str:
# TODO: in case of unilateral close with pending HTLCs, this address will be reused
assert self.is_static_remotekey_enabled()
our_payment_pubkey = self.config[LOCAL].payment_basepoint.pubkey
addr = make_commitment_output_to_remote_address(our_payment_pubkey, has_anchors=self.has_anchors())
if self.has_anchors():
addr = self.lnworker.wallet.get_new_sweep_address_for_channel()
elif self.is_static_remotekey_enabled():
our_payment_pubkey = self.config[LOCAL].payment_basepoint.pubkey
addr = make_commitment_output_to_remote_address(our_payment_pubkey, has_anchors=self.has_anchors())
if self.lnworker:
assert self.lnworker.wallet.is_mine(addr)
return addr