Rename SplicePending and SpliceFailed events
What changed, and why it matters
This commit is a simple rename of two public event types in the Lightning Dev Kit Rust library. `Event::SplicePending` is renamed to `Event::SpliceNegotiated`, and `Event::SpliceFailed` is renamed to `Event::SpliceNegotiationFailed`. The change is purely cosmetic and intended to make the event names better match their meaning (a single negotiation round outcome, not the overall splice lifecycle). No logic, serialization format, or security behavior is changed.
No security action needed. Treat as a normal API naming cleanup. Downstream consumers will need to update their event match arms when upgrading.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch performs a global identifier rename across 10 files. It updates the enum variants in lightning/src/events/mod.rs, all emission sites in channelmanager.rs and channel.rs, test assertions, fuzz harnesses, documentation comments, and a pending changelog. The underlying event payloads, persistence logic, TLV serialization tags, and ordering constraints (e.g., DiscardFunding before SpliceNegotiationFailed) remain identical to the pre-rename code. There is no functional change.
Changed components
lightning/src/events/mod.rslightning/src/ln/channelmanager.rslightning/src/ln/channel.rslightning/src/ln/splicing_tests.rslightning/src/ln/async_signer_tests.rslightning/src/ln/functional_test_utils.rslightning/src/ln/funding.rsfuzz/src/chanmon_consistency.rsfuzz/src/full_stack.rspending_changelog/4388-splice-failed-discard-funding.txtInspect captured patch +84 / −83
diff --git a/fuzz/src/chanmon_consistency.rs b/fuzz/src/chanmon_consistency.rs
index d678d97..678e6a6 100644
--- a/fuzz/src/chanmon_consistency.rs
+++ b/fuzz/src/chanmon_consistency.rs
@@ -2091,7 +2091,7 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(data: &[u8], out: Out) {
)
.unwrap();
},
- events::Event::SplicePending { new_funding_txo, .. } => {
+ events::Event::SpliceNegotiated { new_funding_txo, .. } => {
let broadcaster = match $node {
0 => &broadcast_a,
1 => &broadcast_b,
@@ -2103,7 +2103,7 @@ pub fn do_test<Out: Output + MaybeSend + MaybeSync>(data: &[u8], out: Out) {
assert_eq!(new_funding_txo.txid, splice_tx.compute_txid());
chain_state.add_pending_tx(splice_tx);
},
- events::Event::SpliceFailed { .. } => {},
+ events::Event::SpliceNegotiationFailed { .. } => {},
events::Event::DiscardFunding {
funding_info:
events::FundingInfo::Contribution { .. }
diff --git a/fuzz/src/full_stack.rs b/fuzz/src/full_stack.rs
index 405d615..e79bef7 100644
--- a/fuzz/src/full_stack.rs
+++ b/fuzz/src/full_stack.rs
@@ -1137,10 +1137,10 @@ pub fn do_test(mut data: &[u8], logger: &Arc<dyn Logger + MaybeSend + MaybeSync>
signed_tx,
);
},
- Event::SplicePending { .. } => {
+ Event::SpliceNegotiated { .. } => {
// Splice negotiation completed, waiting for confirmation
},
- Event::SpliceFailed { .. } => {
+ Event::SpliceNegotiationFailed { .. } => {
// Splice failed, inputs can be re-spent
},
Event::OpenChannelRequest {
diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs
index 5a52be0..9d00273 100644
--- a/lightning/src/events/mod.rs
+++ b/lightning/src/events/mod.rs
@@ -1646,8 +1646,8 @@ pub enum Event {
/// # Failure Behavior and Persistence
/// This event will eventually be replayed after failures-to-handle (i.e., the event handler
/// returning `Err(ReplayEvent ())`) and will be persisted across restarts.
- SplicePending {
- /// The `channel_id` of the channel that has a pending splice funding transaction.
+ SpliceNegotiated {
+ /// The `channel_id` of the channel with the negotiated splice funding transaction.
channel_id: ChannelId,
/// The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
/// channels, or to [`ChannelManager::accept_inbound_channel`] for inbound channels.
@@ -1667,7 +1667,7 @@ pub enum Event {
},
/// Used to indicate that a splice negotiation round for the given `channel_id` has failed.
///
- /// Each splice attempt (initial or RBF) resolves to either [`Event::SplicePending`] on
+ /// Each splice attempt (initial or RBF) resolves to either [`Event::SpliceNegotiated`] on
/// success or this event on failure. Prior successfully negotiated splice transactions are
/// unaffected.
///
@@ -1677,7 +1677,7 @@ pub enum Event {
/// # Failure Behavior and Persistence
/// This event will eventually be replayed after failures-to-handle (i.e., the event handler
/// returning `Err(ReplayEvent ())`) and will be persisted across restarts.
- SpliceFailed {
+ SpliceNegotiationFailed {
/// The `channel_id` of the channel for which the splice negotiation round failed.
channel_id: ChannelId,
/// The `user_channel_id` value passed in to [`ChannelManager::create_channel`] for outbound
@@ -2468,7 +2468,7 @@ impl Writeable for Event {
// We never write out FundingTransactionReadyForSigning events as they will be regenerated when
// necessary.
},
- &Event::SplicePending {
+ &Event::SpliceNegotiated {
ref channel_id,
ref user_channel_id,
ref counterparty_node_id,
@@ -2486,7 +2486,7 @@ impl Writeable for Event {
(11, new_funding_redeem_script, required),
});
},
- &Event::SpliceFailed {
+ &Event::SpliceNegotiationFailed {
ref channel_id,
ref user_channel_id,
ref counterparty_node_id,
@@ -3125,7 +3125,7 @@ impl MaybeReadable for Event {
(11, new_funding_redeem_script, required),
});
- Ok(Some(Event::SplicePending {
+ Ok(Some(Event::SpliceNegotiated {
channel_id: channel_id.0.unwrap(),
user_channel_id: user_channel_id.0.unwrap(),
counterparty_node_id: counterparty_node_id.0.unwrap(),
@@ -3146,7 +3146,7 @@ impl MaybeReadable for Event {
(13, contribution, option),
});
- Ok(Some(Event::SpliceFailed {
+ Ok(Some(Event::SpliceNegotiationFailed {
channel_id: channel_id.0.unwrap(),
user_channel_id: user_channel_id.0.unwrap(),
counterparty_node_id: counterparty_node_id.0.unwrap(),
diff --git a/lightning/src/ln/async_signer_tests.rs b/lightning/src/ln/async_signer_tests.rs
index f238c1d..ae73dd8 100644
--- a/lightning/src/ln/async_signer_tests.rs
+++ b/lightning/src/ln/async_signer_tests.rs
@@ -1647,8 +1647,8 @@ fn test_async_splice_initial_commit_sig() {
get_event_msg!(initiator, MessageSendEvent::SendTxSignatures, acceptor_node_id);
acceptor.node.handle_tx_signatures(initiator_node_id, &tx_signatures);
- let _ = get_event!(initiator, Event::SplicePending);
- let _ = get_event!(acceptor, Event::SplicePending);
+ let _ = get_event!(initiator, Event::SpliceNegotiated);
+ let _ = get_event!(acceptor, Event::SpliceNegotiated);
}
#[test]
@@ -1739,6 +1739,6 @@ fn test_async_splice_initial_commit_sig_waits_for_monitor_before_tx_signatures()
get_event_msg!(initiator, MessageSendEvent::SendTxSignatures, acceptor_node_id);
acceptor.node.handle_tx_signatures(initiator_node_id, &tx_signatures);
- let _ = get_event!(initiator, Event::SplicePending);
- let _ = get_event!(acceptor, Event::SplicePending);
+ let _ = get_event!(initiator, Event::SpliceNegotiated);
+ let _ = get_event!(acceptor, Event::SpliceNegotiated);
}
diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs
index 473fc6b..b26ec70 100644
--- a/lightning/src/ln/channel.rs
+++ b/lightning/src/ln/channel.rs
@@ -1185,7 +1185,7 @@ pub(super) struct InteractiveTxMsgError {
/// The underlying error.
pub(super) err: ChannelError,
/// If a splice was in progress when processing the message, this contains the splice funding
- /// information for emitting a `SpliceFailed` event.
+ /// information for emitting a `SpliceNegotiationFailed` event.
pub(super) splice_funding_failed: Option<SpliceFundingFailed>,
}
@@ -1270,7 +1270,7 @@ pub(crate) struct ShutdownResult {
pub(crate) channel_funding_txo: Option<OutPoint>,
pub(crate) last_local_balance_msat: u64,
/// If a splice was in progress when the channel was shut down, this contains
- /// the splice funding information for emitting a SpliceFailed event.
+ /// the splice funding information for emitting a SpliceNegotiationFailed event.
pub(crate) splice_funding_failed: Option<SpliceFundingFailed>,
}
@@ -1278,7 +1278,7 @@ pub(crate) struct ShutdownResult {
pub(crate) struct DisconnectResult {
pub(crate) is_resumable: bool,
/// If a splice was in progress when the channel was shut down, this contains
- /// the splice funding information for emitting a SpliceFailed event.
+ /// the splice funding information for emitting a SpliceNegotiationFailed event.
pub(crate) splice_funding_failed: Option<SpliceFundingFailed>,
}
@@ -7065,7 +7065,7 @@ pub struct SpliceFundingFailed {
impl SpliceFundingFailed {
/// Splits into the funding info for `DiscardFunding` (if there are inputs or outputs to
- /// discard) and the contribution for `SpliceFailed`.
+ /// discard) and the contribution for `SpliceNegotiationFailed`.
pub(super) fn into_parts(self) -> (Option<FundingInfo>, Option<FundingContribution>) {
let funding_info =
if !self.contributed_inputs.is_empty() || !self.contributed_outputs.is_empty() {
@@ -12436,7 +12436,7 @@ where
//
// If the in-progress negotiation later fails (e.g., tx_abort), the derived
// min_rbf_feerate becomes stale, causing a slightly higher feerate than
- // necessary. Call splice_channel again after receiving SpliceFailed to get a
+ // necessary. Call splice_channel again after receiving SpliceNegotiationFailed to get a
// fresh template without the stale RBF constraint.
let prev_feerate =
pending_splice.last_funding_feerate_sat_per_1000_weight.or_else(|| {
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index 6a3be0c..7a3a5bd 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -4173,7 +4173,7 @@ impl<
));
}
pending_events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id: *chan_id,
counterparty_node_id: *counterparty_node_id,
user_channel_id: chan.context().get_user_id(),
@@ -4479,7 +4479,7 @@ impl<
));
}
pending_events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id: shutdown_res.channel_id,
counterparty_node_id: shutdown_res.counterparty_node_id,
user_channel_id: shutdown_res.user_channel_id,
@@ -4985,7 +4985,7 @@ impl<
));
}
pending_events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id: *channel_id,
counterparty_node_id: *counterparty_node_id,
user_channel_id: chan.context.get_user_id(),
@@ -6683,7 +6683,7 @@ impl<
));
}
pending_events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id,
counterparty_node_id,
user_channel_id,
@@ -6741,14 +6741,14 @@ impl<
/// # Events
///
/// Calling this method will commence the process of creating a new funding transaction for the
- /// channel. Once the funding transaction has been constructed, an [`Event::SplicePending`]
+ /// channel. Once the funding transaction has been constructed, an [`Event::SpliceNegotiated`]
/// will be emitted. At this point, any inputs contributed to the splice can only be re-spent
/// if an [`Event::DiscardFunding`] is seen.
///
- /// If any failures occur while negotiating the funding transaction, an [`Event::SpliceFailed`]
- /// will be emitted. Any contributed inputs no longer used will be included in an
- /// [`Event::DiscardFunding`] and thus can be re-spent. If a [`FundingTemplate`] was obtained
- /// while a previous splice was still being negotiated, its
+ /// If any failures occur while negotiating the funding transaction, an
+ /// [`Event::SpliceNegotiationFailed`] will be emitted. Any contributed inputs no longer used
+ /// will be included in an [`Event::DiscardFunding`] and thus can be re-spent. If a
+ /// [`FundingTemplate`] was obtained while a previous splice was still being negotiated, its
/// [`min_rbf_feerate`][FundingTemplate::min_rbf_feerate] may be stale after the failure.
/// Call [`ChannelManager::splice_channel`] again to get a fresh template.
///
@@ -6967,7 +6967,7 @@ impl<
}
if let Some(splice_negotiated) = splice_negotiated {
self.pending_events.lock().unwrap().push_back((
- events::Event::SplicePending {
+ events::Event::SpliceNegotiated {
channel_id: *channel_id,
counterparty_node_id: *counterparty_node_id,
user_channel_id: chan.context().get_user_id(),
@@ -11131,7 +11131,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
.and_then(|v| v.splice_negotiated.take())
{
pending_events.push_back((
- events::Event::SplicePending {
+ events::Event::SpliceNegotiated {
channel_id: channel.context.channel_id(),
counterparty_node_id,
user_channel_id: channel.context.get_user_id(),
@@ -11972,7 +11972,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
.push_back((events::Event::DiscardFunding { channel_id, funding_info }, None));
}
pending_events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id,
counterparty_node_id: *counterparty_node_id,
user_channel_id,
@@ -12224,7 +12224,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
let needs_holding_cell_release = splice_negotiated.is_some();
if let Some(splice_negotiated) = splice_negotiated {
self.pending_events.lock().unwrap().push_back((
- events::Event::SplicePending {
+ events::Event::SpliceNegotiated {
channel_id: msg.channel_id,
counterparty_node_id: *counterparty_node_id,
user_channel_id: chan.context.get_user_id(),
@@ -12310,7 +12310,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
));
}
pending_events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id: msg.channel_id,
counterparty_node_id: *counterparty_node_id,
user_channel_id: chan_entry.get().context().get_user_id(),
@@ -12462,7 +12462,7 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
));
}
pending_events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id: msg.channel_id,
counterparty_node_id: *counterparty_node_id,
user_channel_id: chan.context().get_user_id(),
@@ -15253,16 +15253,16 @@ impl<
self.process_pending_events(&event_handler);
let collected_events = events.into_inner();
- // When both DiscardFunding and SpliceFailed are emitted for the same channel,
- // DiscardFunding must come first so that inputs are unlocked before any retry.
- // Each pair is emitted adjacently under a single lock, so checking adjacent
- // events is sufficient.
+ // When both DiscardFunding and SpliceNegotiationFailed are emitted for the same
+ // channel, DiscardFunding must come first so that inputs are unlocked before any
+ // retry. Each pair is emitted adjacently under a single lock, so checking
+ // adjacent events is sufficient.
for window in collected_events.windows(2) {
- if let events::Event::SpliceFailed { channel_id, .. } = &window[0] {
+ if let events::Event::SpliceNegotiationFailed { channel_id, .. } = &window[0] {
if let events::Event::DiscardFunding { channel_id: cid, .. } = &window[1] {
assert!(
channel_id != cid,
- "DiscardFunding must precede SpliceFailed for channel {}",
+ "DiscardFunding must precede SpliceNegotiationFailed for channel {}",
channel_id,
);
}
@@ -15551,7 +15551,7 @@ impl<
funding_info,
});
}
- splice_failed_events.push(events::Event::SpliceFailed {
+ splice_failed_events.push(events::Event::SpliceNegotiationFailed {
channel_id: chan.context().channel_id(),
counterparty_node_id,
user_channel_id: chan.context().get_user_id(),
@@ -18163,8 +18163,9 @@ impl<
let our_pending_intercepts = self.pending_intercepted_htlcs.lock().unwrap();
// Since some FundingNegotiation variants are not persisted, any splice in such state must
- // be failed upon reload. However, as the necessary information for the SpliceFailed and
- // DiscardFunding events is not persisted, the events need to be persisted even though they
+ // be failed upon reload. However, as the necessary information for the
+ // SpliceNegotiationFailed and DiscardFunding events is not persisted, the events need to
+ // be persisted even though they
// haven't been emitted yet. These are removed after the events are written.
let mut events = self.pending_events.lock().unwrap();
let event_count = events.len();
@@ -18182,7 +18183,7 @@ impl<
));
}
events.push_back((
- events::Event::SpliceFailed {
+ events::Event::SpliceNegotiationFailed {
channel_id: chan.context.channel_id(),
counterparty_node_id: chan.context.get_counterparty_node_id(),
user_channel_id: chan.context.get_user_id(),
@@ -18311,7 +18312,7 @@ impl<
(23, self.best_block.read().unwrap().previous_blocks, required),
});
- // Remove the SpliceFailed and DiscardFunding events added earlier.
+ // Remove the SpliceNegotiationFailed and DiscardFunding events added earlier.
events.truncate(event_count);
Ok(())
diff --git a/lightning/src/ln/functional_test_utils.rs b/lightning/src/ln/functional_test_utils.rs
index c5b1104..f89fdd0 100644
--- a/lightning/src/ln/functional_test_utils.rs
+++ b/lightning/src/ln/functional_test_utils.rs
@@ -2378,7 +2378,7 @@ pub fn check_closed_events(node: &Node, expected_close_events: &[ExpectedCloseEv
discard_events_count
);
assert_eq!(
- events.iter().filter(|e| matches!(e, Event::SpliceFailed { .. },)).count(),
+ events.iter().filter(|e| matches!(e, Event::SpliceNegotiationFailed { .. },)).count(),
splice_events_count
);
}
@@ -3221,7 +3221,7 @@ pub fn expect_splice_pending_event<'a, 'b, 'c, 'd>(
let events = node.node.get_and_clear_pending_events();
assert_eq!(events.len(), 1);
match &events[0] {
- crate::events::Event::SplicePending { channel_id, counterparty_node_id, .. } => {
+ crate::events::Event::SpliceNegotiated { channel_id, counterparty_node_id, .. } => {
assert_eq!(*expected_counterparty_node_id, *counterparty_node_id);
*channel_id
},
@@ -3250,7 +3250,7 @@ pub fn expect_splice_failed_events<'a, 'b, 'c, 'd>(
_ => panic!("Unexpected event"),
}
match &events[1] {
- Event::SpliceFailed { channel_id, reason, contribution, .. } => {
+ Event::SpliceNegotiationFailed { channel_id, reason, contribution, .. } => {
assert_eq!(*expected_channel_id, *channel_id);
assert_eq!(expected_reason, *reason);
assert_eq!(contribution.as_ref(), Some(&funding_contribution));
diff --git a/lightning/src/ln/funding.rs b/lightning/src/ln/funding.rs
index 2867a03..e954149 100644
--- a/lightning/src/ln/funding.rs
+++ b/lightning/src/ln/funding.rs
@@ -121,10 +121,10 @@ pub enum FundingContributionError {
///
/// Note: [`FundingTemplate::min_rbf_feerate`] may be derived from an in-progress
/// negotiation that later aborts, leaving a stale (higher than necessary) minimum. If
- /// this error occurs after receiving [`Event::SpliceFailed`], call
+ /// this error occurs after receiving [`Event::SpliceNegotiationFailed`], call
/// [`ChannelManager::splice_channel`] again to get a fresh template.
///
- /// [`Event::SpliceFailed`]: crate::events::Event::SpliceFailed
+ /// [`Event::SpliceNegotiationFailed`]: crate::events::Event::SpliceNegotiationFailed
/// [`ChannelManager::splice_channel`]: crate::ln::channelmanager::ChannelManager::splice_channel
FeeRateBelowRbfMinimum {
/// The requested feerate.
diff --git a/lightning/src/ln/splicing_tests.rs b/lightning/src/ln/splicing_tests.rs
index 1c6ad83..4135f2b 100644
--- a/lightning/src/ln/splicing_tests.rs
+++ b/lightning/src/ln/splicing_tests.rs
@@ -3203,7 +3203,7 @@ fn do_abandon_splice_quiescent_action_on_shutdown(local_shutdown: bool, pending_
};
assert!(nodes[0].node.get_and_clear_pending_msg_events().is_empty());
- // Close the channel. We should see a `SpliceFailed` event for the pending splice
+ // Close the channel. We should see a `SpliceNegotiationFailed` event for the pending splice
// `QuiescentAction`.
let (closer_node, closee_node) =
if local_shutdown { (&nodes[0], &nodes[1]) } else { (&nodes[1], &nodes[0]) };
@@ -3233,12 +3233,12 @@ fn do_abandon_splice_quiescent_action_on_shutdown(local_shutdown: bool, pending_
other => panic!("Expected DiscardFunding with Contribution, got {:?}", other),
}
match &events[1] {
- Event::SpliceFailed { channel_id: cid, reason, contribution, .. } => {
+ Event::SpliceNegotiationFailed { channel_id: cid, reason, contribution, .. } => {
assert_eq!(*cid, channel_id);
assert_eq!(*reason, NegotiationFailureReason::ChannelClosing);
assert!(contribution.is_some());
},
- other => panic!("Expected SpliceFailed, got {:?}", other),
+ other => panic!("Expected SpliceNegotiationFailed, got {:?}", other),
}
} else {
expect_splice_failed_events(
@@ -4041,7 +4041,7 @@ fn test_funding_contributed_active_funding_negotiation() {
fn do_test_funding_contributed_active_funding_negotiation(state: u8) {
// Tests that calling funding_contributed when a splice is already being actively negotiated
// (pending_splice.funding_negotiation exists and is_initiator()) returns Err(APIMisuseError)
- // and emits SpliceFailed + DiscardFunding events for non-duplicate contributions, or
+ // and emits SpliceNegotiationFailed + DiscardFunding events for non-duplicate contributions, or
// returns Err(APIMisuseError) with no events for duplicate contributions.
//
// State 0: AwaitingAck (splice_init sent, splice_ack not yet received)
@@ -4177,7 +4177,7 @@ fn do_test_funding_contributed_active_funding_negotiation(state: u8) {
#[test]
fn test_funding_contributed_channel_shutdown() {
// Tests that calling funding_contributed after initiating channel shutdown returns Err(APIMisuseError)
- // and emits both SpliceFailed and DiscardFunding events. The channel is no longer usable
+ // and emits both SpliceNegotiationFailed and DiscardFunding events. The channel is no longer usable
// after shutdown is initiated, so quiescence cannot be proposed.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
@@ -4206,7 +4206,7 @@ fn test_funding_contributed_channel_shutdown() {
// Now call funding_contributed - this should trigger FailSplice because
// propose_quiescence() will fail when is_usable() returns false.
- // Returns Err(APIMisuseError) and emits both SpliceFailed and DiscardFunding.
+ // Returns Err(APIMisuseError) and emits both SpliceNegotiationFailed and DiscardFunding.
assert_eq!(
nodes[0].node.funding_contributed(
&channel_id,
@@ -4561,7 +4561,7 @@ pub fn reenter_quiescence<'a, 'b, 'c>(
#[test]
fn test_splice_acceptor_disconnect_emits_events() {
// When both nodes contribute to a splice and the negotiation fails due to disconnect,
- // both the initiator and acceptor should receive SpliceFailed + DiscardFunding events
+ // both the initiator and acceptor should receive SpliceNegotiationFailed + DiscardFunding events
// so each can reclaim their UTXOs.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
@@ -4600,7 +4600,7 @@ fn test_splice_acceptor_disconnect_emits_events() {
nodes[0].node.peer_disconnected(node_id_1);
nodes[1].node.peer_disconnected(node_id_0);
- // The initiator should get SpliceFailed + DiscardFunding.
+ // The initiator should get SpliceNegotiationFailed + DiscardFunding.
expect_splice_failed_events(
&nodes[0],
&channel_id,
@@ -4608,7 +4608,7 @@ fn test_splice_acceptor_disconnect_emits_events() {
NegotiationFailureReason::PeerDisconnected,
);
- // The acceptor should also get SpliceFailed + DiscardFunding with its contributions
+ // The acceptor should also get SpliceNegotiationFailed + DiscardFunding with its contributions
// so it can reclaim its UTXOs. The contribution is feerate-adjusted by handle_splice_init,
// so we check for non-empty inputs/outputs rather than exact values.
let events = nodes[1].node.get_and_clear_pending_events();
@@ -4624,12 +4624,12 @@ fn test_splice_acceptor_disconnect_emits_events() {
other => panic!("Expected DiscardFunding with Contribution, got {:?}", other),
}
match &events[1] {
- Event::SpliceFailed { channel_id: cid, reason, contribution, .. } => {
+ Event::SpliceNegotiationFailed { channel_id: cid, reason, contribution, .. } => {
assert_eq!(*cid, channel_id);
assert_eq!(*reason, NegotiationFailureReason::PeerDisconnected);
assert!(contribution.is_some());
},
- other => panic!("Expected SpliceFailed, got {:?}", other),
+ other => panic!("Expected SpliceNegotiationFailed, got {:?}", other),
}
// Reconnect and verify the channel is still operational.
@@ -4856,11 +4856,11 @@ fn test_splice_rbf_insufficient_feerate() {
// The RBF round contributed the same inputs and outputs as the prior round, so after
// filtering against the prior round's committed UTXOs nothing remains to discard and
- // `DiscardFunding` is suppressed; only `SpliceFailed` is emitted.
+ // `DiscardFunding` is suppressed; only `SpliceNegotiationFailed` is emitted.
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1, "{events:?}");
assert!(
- matches!(&events[0], Event::SpliceFailed { channel_id: cid, .. } if *cid == channel_id)
+ matches!(&events[0], Event::SpliceNegotiationFailed { channel_id: cid, .. } if *cid == channel_id)
);
let msg_events = nodes[0].node.get_and_clear_pending_msg_events();
@@ -4916,7 +4916,7 @@ fn test_splice_rbf_insufficient_feerate() {
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1);
assert!(
- matches!(&events[0], Event::SpliceFailed { channel_id: cid, .. } if *cid == channel_id)
+ matches!(&events[0], Event::SpliceNegotiationFailed { channel_id: cid, .. } if *cid == channel_id)
);
nodes[1].node.handle_tx_abort(node_id_0, &tx_abort_echo);
@@ -5007,7 +5007,7 @@ fn test_splice_rbf_insufficient_feerate_high() {
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1);
assert!(
- matches!(&events[0], Event::SpliceFailed { channel_id: cid, .. } if *cid == channel_id)
+ matches!(&events[0], Event::SpliceNegotiationFailed { channel_id: cid, .. } if *cid == channel_id)
);
nodes[1].node.handle_tx_abort(node_id_0, &tx_abort_echo);
@@ -6439,7 +6439,7 @@ fn test_splice_rbf_amends_prior_net_negative_contribution_request() {
fn test_splice_rbf_acceptor_contributes_then_disconnects() {
// When both nodes contribute to a splice and the initiator RBFs (with the acceptor
// re-contributing via prior contribution), disconnecting mid-interactive-TX should emit
- // SpliceFailed + DiscardFunding for both nodes so each can reclaim their UTXOs.
+ // SpliceNegotiationFailed + DiscardFunding for both nodes so each can reclaim their UTXOs.
let chanmon_cfgs = create_chanmon_cfgs(2);
let node_cfgs = create_node_cfgs(2, &chanmon_cfgs);
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
@@ -6520,12 +6520,12 @@ fn test_splice_rbf_acceptor_contributes_then_disconnects() {
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1, "{events:?}");
match &events[0] {
- Event::SpliceFailed { channel_id: cid, reason, contribution, .. } => {
+ Event::SpliceNegotiationFailed { channel_id: cid, reason, contribution, .. } => {
assert_eq!(*cid, channel_id);
assert_eq!(*reason, NegotiationFailureReason::PeerDisconnected);
assert!(contribution.is_some());
},
- other => panic!("Expected SpliceFailed, got {:?}", other),
+ other => panic!("Expected SpliceNegotiationFailed, got {:?}", other),
}
// The acceptor re-contributed the same UTXOs as round 0 (via prior contribution
@@ -6594,7 +6594,7 @@ fn test_splice_rbf_disconnect_filters_prior_contributions() {
nodes[0].node.peer_disconnected(node_id_1);
nodes[1].node.peer_disconnected(node_id_0);
- // The initiator should get DiscardFunding + SpliceFailed with filtered contributions.
+ // The initiator should get DiscardFunding + SpliceNegotiationFailed with filtered contributions.
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 2, "{events:?}");
match &events[0] {
@@ -6611,12 +6611,12 @@ fn test_splice_rbf_disconnect_filters_prior_contributions() {
other => panic!("Expected DiscardFunding with Contribution, got {:?}", other),
}
match &events[1] {
- Event::SpliceFailed { channel_id: cid, reason, contribution, .. } => {
+ Event::SpliceNegotiationFailed { channel_id: cid, reason, contribution, .. } => {
assert_eq!(*cid, channel_id);
assert_eq!(*reason, NegotiationFailureReason::PeerDisconnected);
assert!(contribution.is_some());
},
- other => panic!("Expected SpliceFailed, got {:?}", other),
+ other => panic!("Expected SpliceNegotiationFailed, got {:?}", other),
}
// Reconnect. After a completed splice, channel_ready is not re-sent.
@@ -6641,12 +6641,12 @@ fn test_splice_rbf_disconnect_filters_prior_contributions() {
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1, "{events:?}");
match &events[0] {
- Event::SpliceFailed { channel_id: cid, reason, contribution, .. } => {
+ Event::SpliceNegotiationFailed { channel_id: cid, reason, contribution, .. } => {
assert_eq!(*cid, channel_id);
assert_eq!(*reason, NegotiationFailureReason::PeerDisconnected);
assert!(contribution.is_some());
},
- other => panic!("Expected SpliceFailed, got {:?}", other),
+ other => panic!("Expected SpliceNegotiationFailed, got {:?}", other),
}
let mut reconnect_args = ReconnectArgs::new(&nodes[0], &nodes[1]);
@@ -7050,7 +7050,7 @@ fn test_rbf_sync_returns_err_when_max_feerate_below_min_rbf() {
fn test_splice_revalidation_at_quiescence() {
// When an outbound HTLC is committed between funding_contributed and quiescence, the
// holder's balance decreases. If the splice-out was marginal at funding_contributed time,
- // the re-validation at quiescence should fail and emit SpliceFailed + DiscardFunding.
+ // the re-validation at quiescence should fail and emit SpliceNegotiationFailed + DiscardFunding.
//
// Flow:
// 1. Send payment #1 (update_add + CS) → node 0 awaits RAA
@@ -7425,17 +7425,17 @@ fn test_splice_rbf_rejects_own_low_feerate_after_several_attempts() {
let result = nodes[0].node.funding_contributed(&channel_id, &node_id_1, contribution, None);
assert!(result.is_err(), "Expected rejection for low feerate: {:?}", result);
- // SpliceFailed is emitted. DiscardFunding is not emitted because all inputs/outputs
+ // SpliceNegotiationFailed is emitted. DiscardFunding is not emitted because all inputs/outputs
// are filtered out (same UTXOs reused for RBF, still committed to the prior splice tx).
let events = nodes[0].node.get_and_clear_pending_events();
assert_eq!(events.len(), 1, "{events:?}");
match &events[0] {
- Event::SpliceFailed { channel_id: cid, reason, contribution, .. } => {
+ Event::SpliceNegotiationFailed { channel_id: cid, reason, contribution, .. } => {
assert_eq!(*cid, channel_id);
assert_eq!(*reason, NegotiationFailureReason::FeeRateTooLow);
assert!(contribution.is_some());
},
- other => panic!("Expected SpliceFailed, got {:?}", other),
+ other => panic!("Expected SpliceNegotiationFailed, got {:?}", other),
}
}
diff --git a/pending_changelog/4388-splice-failed-discard-funding.txt b/pending_changelog/4388-splice-failed-discard-funding.txt
index 64fc4ab..67680f4 100644
--- a/pending_changelog/4388-splice-failed-discard-funding.txt
+++ b/pending_changelog/4388-splice-failed-discard-funding.txt
@@ -1,21 +1,21 @@
# API Updates
- * `Event::SpliceFailed` no longer carries `contributed_inputs` or `contributed_outputs` fields.
+ * `Event::SpliceNegotiationFailed` no longer carries `contributed_inputs` or `contributed_outputs` fields.
Instead, a separate `Event::DiscardFunding` event with `FundingInfo::Contribution` is emitted
for UTXO cleanup.
* `Event::DiscardFunding` with `FundingInfo::Contribution` is also emitted without a
- corresponding `Event::SpliceFailed` when `ChannelManager::funding_contributed` returns an
+ corresponding `Event::SpliceNegotiationFailed` when `ChannelManager::funding_contributed` returns an
error (e.g., channel or peer not found, wrong channel state, duplicate contribution).
# Backwards Compatibility
* Older serializations that included `contributed_inputs` and `contributed_outputs` in
- `SpliceFailed` will have those fields silently ignored on deserialization (they were odd TLV
+ `SpliceNegotiationFailed` will have those fields silently ignored on deserialization (they were odd TLV
fields). A `DiscardFunding` event will not be produced when reading these older serializations.
# Forward Compatibility
* Downgrading will not set the removed `contributed_inputs`/`contributed_outputs` fields on
- `SpliceFailed`, so older code expecting those fields will see empty vectors for splice
+ `SpliceNegotiationFailed`, so older code expecting those fields will see empty vectors for splice
failures.
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.