Skip to content

Commit b8fc4f9

Browse files
Add ChannelMonitor justice tx API for simplified watchtower integration
Adds sign_initial_justice_txs(), sign_justice_txs_from_update(), and get_pending_justice_txs() to ChannelMonitor, enabling Persist implementors to obtain signed justice transactions for both to_local and HTLC outputs without maintaining external state. Storage uses cur/prev counterparty commitment fields on FundingScope, matching the existing pattern and supporting splicing. The API is crash-safe: commitment data is cloned rather than consumed, and get_pending_justice_txs() allows recovery after restart. Simplifies WatchtowerPersister in test_utils by removing manual queue and signing logic. Addresses feedback from lightningdevkit/ldk-node#813 and picks up the intent of #2552.
1 parent db42ad6 commit b8fc4f9

File tree

3 files changed

+398
-95
lines changed

3 files changed

+398
-95
lines changed

0 commit comments

Comments
 (0)