Skip to content

Commit c737e92

Browse files
jkczyzclaude
andcommitted
f - Document the single-broadcast assumption for funding tracking
LDK calls broadcast_transactions once per signed funding or splice tx today. Record that assumption and note what would need to change if upstream starts rebroadcasting unconfirmed funding or splice transactions. No behavior change. Generated with assistance from Claude Code. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 991d9b0 commit c737e92

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/wallet/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1715,6 +1715,12 @@ impl Wallet {
17151715
Ok(new_txid)
17161716
}
17171717

1718+
// TODO: `classify_funding` and `classify_splice` assume they are invoked once per
1719+
// transaction. LDK currently calls `broadcast_transactions` exactly once per signed
1720+
// funding or splice tx, so the assumption holds. If upstream adds rebroadcasting of
1721+
// unconfirmed funding/splice txs, add idempotency guards (e.g. skip when the txid is
1722+
// already tracked via `find_payment_by_txid`, and broaden the "last candidate" check
1723+
// in `classify_splice` to "any candidate").
17181724
pub(crate) fn classify_broadcast(
17191725
&self, tx: &Transaction, tx_type: &TransactionType,
17201726
) -> Result<(), Error> {

0 commit comments

Comments
 (0)