Skip to content

Conversation

@SomberNight
Copy link
Member

@SomberNight SomberNight commented Nov 20, 2025

If RHASH is in lnworker.dont_settle_htlcs, we should not reveal
the preimage. But also, we should not disregard the htlc either.
lnwatcher needs to keep waiting until either the user cancels/settles
the hold invoice, or until the hold_invoice's CLTV expires.

TODO: I need to write a test for this!

If RHASH is in lnworker.dont_settle_htlcs, we should not reveal
the preimage. But also, we should not disregard the htlc either.
lnwatcher needs to keep waiting until either the user cancels/settles
the hold invoice, or until the hold_invoice's CLTV expires.
Comment on lines +490 to +495
if htlc.payment_hash in chan.lnworker.dont_settle_htlcs:
txs[prevout] = KeepWatchingTXO(
name=sweep_info_name + "_for_hold_invoice",
until_height=htlc.cltv_abs,
)
return None
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: needs more thought in light of #10230 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant