fix: resolve manual holds at their block-height deadline #24

Merged
thesimplekid merged 1 commit from fix/hold-deadlines into main 2026-10-09 16:38:07 +00:00
Owner

A hold can remain Pending in LDK after its HTLCs fail back at the claim deadline, leaving a selected application reservation unresolved. Compare the node block height with the stored deadline in authorization, claim, rejection, and recovery paths. Preserve successful payments and persist a conservative 2,016-block bound when a deadline was missed.

Document the required node:read permission and test deadline tightening, offline observations, restart, and already-successful claims.

Closes #21. Depends on #23.

Validation: focused protocol tests, workspace formatting/Clippy/tests/docs, and real Bitcoin/LDK regtest passed. The final dependent stack passed all 78 tests and native Nix checks.

A hold can remain Pending in LDK after its HTLCs fail back at the claim deadline, leaving a selected application reservation unresolved. Compare the node block height with the stored deadline in authorization, claim, rejection, and recovery paths. Preserve successful payments and persist a conservative 2,016-block bound when a deadline was missed. Document the required node:read permission and test deadline tightening, offline observations, restart, and already-successful claims. Closes #21. Depends on #23. Validation: focused protocol tests, workspace formatting/Clippy/tests/docs, and real Bitcoin/LDK regtest passed. The final dependent stack passed all 78 tests and native Nix checks.
fix: resolve manual holds at their block-height deadline
Some checks failed
Checks / format (push) Successful in 1m9s
Checks / dependencies (push) Successful in 1m10s
Checks / cdk-compatible (push) Successful in 14m11s
Checks / format (pull_request) Successful in 55s
Checks / dependencies (pull_request) Successful in 1m12s
Checks / checks (push) Failing after 51m4s
Checks / checks (pull_request) Failing after 15m25s
Checks / cdk-compatible (pull_request) Failing after 12m31s
4257aac243
Read the authenticated node height before checking a held payment. Exclude
expired pending holds from authorizations and resolve selected claims as
Failed, while preserving successful payment records during recovery.

Persist a conservative 2016-block bound when an event deadline is missing.
Repeated observations can tighten deadlines but cannot extend them. Document
the required node:read permission and cover deadline and restart behavior.

Refs: #21
thesimplekid changed target branch from simplify/payment-adapters to main 2026-10-09 16:38:05 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
thesimplekid/satsettle!24
No description provided.