Qt: add closing warning if we have an unconfirmed local commitment tx with htlcs

add htlc direction (offered, received) to the htlc sweep_info name
regtest: add test_reedeem_received_htlcs
This commit is contained in:
ThomasV
2025-05-08 19:28:05 +02:00
parent 7d6c21f233
commit 0607a406ce
8 changed files with 81 additions and 13 deletions

View File

@@ -385,7 +385,7 @@ def sweep_our_ctx(
htlc_relative_idx=htlc_relative_idx)
if actual_htlc_tx is None:
name = 'first-stage-htlc-anchors' if chan.has_anchors() else 'first-stage-htlc'
name = 'offered-htlc' if htlc_direction == SENT else 'received-htlc'
prevout = ctx.txid() + f':{ctx_output_idx}'
csv_delay = 1 if chan.has_anchors() else 0
txs[prevout] = SweepInfo(