1
0

fixes after rebase

This commit is contained in:
ThomasV
2024-11-20 15:02:05 +01:00
parent 8f7c11f295
commit 4d26fb552b
2 changed files with 6 additions and 5 deletions

View File

@@ -665,7 +665,7 @@ class ChannelBackup(AbstractChannel):
# we might calculate a different address here, which might not be wallet.is_mine,
# but that should be harmless)
our_payment_pubkey = self.config[LOCAL].payment_basepoint.pubkey
to_remote_address = make_commitment_output_to_remote_address(our_payment_pubkey)
to_remote_address = make_commitment_output_to_remote_address(our_payment_pubkey, has_anchors=self.has_anchors())
return [to_remote_address]
else: # on-chain backup
return []
@@ -1235,7 +1235,7 @@ class Channel(AbstractChannel):
htlc_sigs = list(chunks(data, 64))
htlc_sig = htlc_sigs[htlc_relative_idx]
remote_sighash = Sighash.ALL if not self.has_anchors() else Sighash.ANYONECANPAY | Sighash.SINGLE
remote_htlc_sig = ecc.ecdsa_der_sig_from_ecdsa_sig64(htlc_sig) + remote_sighash.to_sigbytes(1, 'big')
remote_htlc_sig = ecc.ecdsa_der_sig_from_ecdsa_sig64(htlc_sig) + Sighash.to_sigbytes(remote_sighash)
return remote_htlc_sig
def revoke_current_commitment(self):

View File

@@ -214,7 +214,7 @@ def create_sweeptxs_for_our_ctx(
if not chan.is_backup():
assert chan.is_static_remotekey_enabled()
their_payment_pubkey = their_conf.payment_basepoint.pubkey
to_remote_address = make_commitment_output_to_remote_address(their_payment_pubkey)
to_remote_address = make_commitment_output_to_remote_address(their_payment_pubkey, has_anchors=chan.has_anchors())
found_to_remote = bool(ctx.get_output_idxs_from_address(to_remote_address))
else:
found_to_remote = False
@@ -370,7 +370,7 @@ def create_sweeptxs_for_their_ctx(
if not chan.is_backup():
assert chan.is_static_remotekey_enabled()
our_payment_pubkey = our_conf.payment_basepoint.pubkey
to_remote_address = make_commitment_output_to_remote_address(our_payment_pubkey)
to_remote_address = make_commitment_output_to_remote_address(our_payment_pubkey, has_anchors=chan.has_anchors())
found_to_remote = bool(ctx.get_output_idxs_from_address(to_remote_address))
else:
found_to_remote = False
@@ -404,7 +404,8 @@ def create_sweeptxs_for_their_ctx(
remote_htlc_pubkey=our_htlc_privkey.get_public_key_bytes(compressed=True),
local_htlc_pubkey=their_htlc_pubkey,
payment_hash=htlc.payment_hash,
cltv_abs=htlc.cltv_abs)
cltv_abs=htlc.cltv_abs,
has_anchors=chan.has_anchors())
cltv_abs = htlc.cltv_abs if is_received_htlc and not is_revocation else 0
prevout = ctx.txid() + ':%d'%ctx_output_idx