Add splice details to TransactionType::Splice#4570
Add splice details to TransactionType::Splice#4570jkczyz wants to merge 2 commits intolightningdevkit:mainfrom
TransactionType::Splice#4570Conversation
`TransactionType::Splice` now carries the local contribution to the splice and, for RBF, the txid of the prior negotiated candidate being replaced. This lets LDK Node update its `PaymentDetails` and `PendingPaymentDetails` from the broadcast callback without re-deriving the contribution from the raw transaction or tracking RBF chains itself. Driving these updates from the `SplicePending` event instead is more complicated because that event races with BDK wallet syncing and doesn't carry the replaced txid; the broadcast callback is a cleaner integration point. The `Hash` derive on `TransactionType` is dropped since it isn't used anywhere in the workspace and `FundingContribution` (now embedded) transitively contains `ConfirmedUtxo`, which doesn't derive `Hash`. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Add public getters for `estimated_fee`, `inputs`, and `max_feerate`, and elevate `feerate` from `pub(super)` to `pub`. Together with the existing `value_added`, `outputs`, and `change_output`, this gives downstream consumers of `TransactionType::Splice` (notably LDK Node, which updates `PaymentDetails` from the broadcast callback) the data they need without reaching into the raw transaction. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
👋 Thanks for assigning @wpaulino as a reviewer! |
|
I've thoroughly reviewed every file and hunk in the diff. Here is my assessment: No issues found. The core logic is correct:
|
Surface splice broadcast metadata downstream, so consumers (notably LDK Node) can reconcile
PaymentDetails/PendingPaymentDetailsdirectly from the broadcaster callback.TransactionType::Splicenow carriescontribution: Option<FundingContribution>— our local contribution for this round, andreplaced_txid: Option<Txid>— the prior negotiated candidate being replaced on RBF. The alternative (reacting toSplicePending) is worse: that event races with BDK wallet sync and doesn't carry the replaced txid.FundingContributiongains public getters forestimated_fee,inputs, andmax_feerate;feerateis elevated frompub(super)topub. Combined with existingvalue_added,outputs,change_output, this exposes everything a downstream consumer needs without reaching into the raw transaction.The
Hashderive onTransactionTypeis dropped (unused in the workspace;FundingContributiontransitively containsConfirmedUtxowhich lacksHash).