Only emit Event::SpliceNegotiated when contributing
What changed, and why it matters
This commit changes when users of the Lightning Dev Kit library are notified about a 'splice'—a way to resize a Lightning channel's on-chain funding. Previously both sides got an event when a splice was negotiated. Now only the side that actually added or removed money (a 'local contribution') gets the event. The other side still learns about the locked splice later through a different event. This is a user-interface cleanup, not a security fix, and does not change how funds are protected.
No security action required. Developers integrating LDK should review their event handling to ensure they do not rely on `Event::SpliceNegotiated` for non-contributing splices; use `Event::ChannelReady` if notification for all locked splices is needed.
Security signals we found
Behavioral change in event emission only; no cryptographic or consensus logic modified
No change to transaction validation, signature checks, or fund handling
Commit message explicitly describes change as reducing noise, not fixing a vulnerability
Tests updated to match new expected event behavior
Evidence from the diff
The patch adds a has_local_contribution flag to SpliceFundingNegotiated and only emits Event::SpliceNegotiated when that flag is true. It derives the flag from the interactive transaction signing session. Tests are updated to assert that the non-contributing peer’s pending event queue is empty after splice negotiation. The commit message frames this as reducing event noise, and an alternative notification path (Event::ChannelReady) remains available.
Changed components
lightning/src/events/mod.rslightning/src/ln/channel.rslightning/src/ln/channelmanager.rslightning/src/ln/async_signer_tests.rslightning/src/ln/splicing_tests.rsInspect captured patch +113 / −91
diff --git a/lightning/src/events/mod.rs b/lightning/src/events/mod.rs
index ec0ad6c..2e56d35 100644
--- a/lightning/src/events/mod.rs
+++ b/lightning/src/events/mod.rs
@@ -1647,8 +1647,12 @@ pub enum Event {
/// [`ChainMonitor::get_claimable_balances`]: crate::chain::chainmonitor::ChainMonitor::get_claimable_balances
last_local_balance_msat: Option<u64>,
},
- /// Used to indicate that a splice for the given `channel_id` has been negotiated and its
- /// funding transaction has been broadcast.
+ /// Used to indicate that a splice for the given `channel_id` has been negotiated, its
+ /// funding transaction has been broadcast, and local inputs or outputs were contributed to
+ /// it.
+ ///
+ /// This event is not emitted if the counterparty negotiated a splice without using a local
+ /// contribution.
///
/// The splice is then considered pending until both parties have seen enough confirmations to
/// consider the funding locked. Once this occurs, an [`Event::ChannelReady`] will be emitted.
@@ -1679,9 +1683,9 @@ 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::SpliceNegotiated`] on
- /// success or this event on failure. Prior successfully negotiated splice transactions are
- /// unaffected.
+ /// Each splice attempt (initial or RBF) resolves to this event on failure. On success,
+ /// [`Event::SpliceNegotiated`] is emitted if the negotiated transaction includes local
+ /// inputs or outputs. Prior successfully negotiated splice transactions are unaffected.
///
/// Any UTXOs contributed to the failed round that are not committed to a prior negotiated
/// splice transaction will be returned via a preceding [`Event::DiscardFunding`].
diff --git a/lightning/src/ln/async_signer_tests.rs b/lightning/src/ln/async_signer_tests.rs
index f36c197..f60e63a 100644
--- a/lightning/src/ln/async_signer_tests.rs
+++ b/lightning/src/ln/async_signer_tests.rs
@@ -1853,7 +1853,7 @@ fn test_async_splice_initial_commit_sig() {
acceptor.node.handle_tx_signatures(initiator_node_id, &tx_signatures);
let _ = get_event!(initiator, Event::SpliceNegotiated);
- let _ = get_event!(acceptor, Event::SpliceNegotiated);
+ assert!(acceptor.node.get_and_clear_pending_events().is_empty());
}
#[test]
@@ -1945,7 +1945,7 @@ fn test_async_splice_initial_commit_sig_waits_for_monitor_before_tx_signatures()
acceptor.node.handle_tx_signatures(initiator_node_id, &tx_signatures);
let _ = get_event!(initiator, Event::SpliceNegotiated);
- let _ = get_event!(acceptor, Event::SpliceNegotiated);
+ assert!(acceptor.node.get_and_clear_pending_events().is_empty());
}
#[test]
@@ -2022,5 +2022,5 @@ fn test_async_splice_shared_input_signature_released_on_unblock() {
acceptor.node.handle_tx_signatures(initiator_node_id, &tx_signatures);
let _ = get_event!(initiator, Event::SpliceNegotiated);
- let _ = get_event!(acceptor, Event::SpliceNegotiated);
+ assert!(acceptor.node.get_and_clear_pending_events().is_empty());
}
diff --git a/lightning/src/ln/channel.rs b/lightning/src/ln/channel.rs
index 51a6795..9fab47f 100644
--- a/lightning/src/ln/channel.rs
+++ b/lightning/src/ln/channel.rs
@@ -7185,6 +7185,9 @@ pub struct SpliceFundingNegotiated {
/// The outpoint of the channel's splice funding transaction.
pub funding_txo: bitcoin::OutPoint,
+ /// Whether the holder contributed local inputs or outputs to the negotiated splice.
+ pub has_local_contribution: bool,
+
/// The features that this channel will operate with.
pub channel_type: ChannelTypeFeatures,
@@ -9559,11 +9562,18 @@ where
funding.get_funding_txo().expect("funding outpoint should be set");
let channel_type = funding.get_channel_type().clone();
let funding_redeem_script = funding.get_funding_redeemscript();
+ let has_local_contribution = self
+ .context
+ .interactive_tx_signing_session
+ .as_ref()
+ .map(|signing_session| signing_session.has_local_contribution())
+ .unwrap_or(false);
pending_splice.negotiated_candidates.push(funding);
let splice_negotiated = SpliceFundingNegotiated {
funding_txo: funding_txo.into_bitcoin_outpoint(),
+ has_local_contribution,
channel_type,
funding_redeem_script,
};
diff --git a/lightning/src/ln/channelmanager.rs b/lightning/src/ln/channelmanager.rs
index e333529..2667d5f 100644
--- a/lightning/src/ln/channelmanager.rs
+++ b/lightning/src/ln/channelmanager.rs
@@ -6783,8 +6783,9 @@ impl<
///
/// 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::SpliceNegotiated`]
- /// will be emitted. At this point, any inputs contributed to the splice can only be re-spent
- /// if an [`Event::DiscardFunding`] is seen.
+ /// will be emitted if the negotiated transaction includes local inputs or outputs. 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::SpliceNegotiationFailed`] will be emitted. Any contributed inputs no longer used
@@ -7007,18 +7008,20 @@ impl<
);
}
if let Some(splice_negotiated) = splice_negotiated {
- self.pending_events.lock().unwrap().push_back((
- events::Event::SpliceNegotiated {
- channel_id: *channel_id,
- counterparty_node_id: *counterparty_node_id,
- user_channel_id: chan.context().get_user_id(),
- new_funding_txo: splice_negotiated.funding_txo,
- channel_type: splice_negotiated.channel_type,
- new_funding_redeem_script: splice_negotiated
- .funding_redeem_script,
- },
- None,
- ));
+ if splice_negotiated.has_local_contribution {
+ self.pending_events.lock().unwrap().push_back((
+ events::Event::SpliceNegotiated {
+ channel_id: *channel_id,
+ counterparty_node_id: *counterparty_node_id,
+ user_channel_id: chan.context().get_user_id(),
+ new_funding_txo: splice_negotiated.funding_txo,
+ channel_type: splice_negotiated.channel_type,
+ new_funding_redeem_script: splice_negotiated
+ .funding_redeem_script,
+ },
+ None,
+ ));
+ }
}
if chan.context().is_connected() {
@@ -11201,17 +11204,19 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
.as_mut()
.and_then(|v| v.splice_negotiated.take())
{
- pending_events.push_back((
- events::Event::SpliceNegotiated {
- channel_id: channel.context.channel_id(),
- counterparty_node_id,
- user_channel_id: channel.context.get_user_id(),
- new_funding_txo: splice_negotiated.funding_txo,
- channel_type: splice_negotiated.channel_type,
- new_funding_redeem_script: splice_negotiated.funding_redeem_script,
- },
- None,
- ));
+ if splice_negotiated.has_local_contribution {
+ pending_events.push_back((
+ events::Event::SpliceNegotiated {
+ channel_id: channel.context.channel_id(),
+ counterparty_node_id,
+ user_channel_id: channel.context.get_user_id(),
+ new_funding_txo: splice_negotiated.funding_txo,
+ channel_type: splice_negotiated.channel_type,
+ new_funding_redeem_script: splice_negotiated.funding_redeem_script,
+ },
+ None,
+ ));
+ }
}
}
@@ -12286,18 +12291,20 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
// which also terminates quiescence.
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::SpliceNegotiated {
- channel_id: msg.channel_id,
- counterparty_node_id: *counterparty_node_id,
- user_channel_id: chan.context.get_user_id(),
- new_funding_txo: splice_negotiated.funding_txo,
- channel_type: splice_negotiated.channel_type,
- new_funding_redeem_script: splice_negotiated
- .funding_redeem_script,
- },
- None,
- ));
+ if splice_negotiated.has_local_contribution {
+ self.pending_events.lock().unwrap().push_back((
+ events::Event::SpliceNegotiated {
+ channel_id: msg.channel_id,
+ counterparty_node_id: *counterparty_node_id,
+ user_channel_id: chan.context.get_user_id(),
+ new_funding_txo: splice_negotiated.funding_txo,
+ channel_type: splice_negotiated.channel_type,
+ new_funding_redeem_script: splice_negotiated
+ .funding_redeem_script,
+ },
+ None,
+ ));
+ }
}
let holding_cell_res = if needs_holding_cell_release {
self.check_free_peer_holding_cells(peer_state)
@@ -14148,17 +14155,20 @@ This indicates a bug inside LDK. Please report this error at https://github.com/
.and_then(|funding_tx_signed| funding_tx_signed.splice_negotiated.take())
{
*needs_holding_cell_release = true;
- self.pending_events.lock().unwrap().push_back((
- events::Event::SpliceNegotiated {
- channel_id,
- counterparty_node_id: node_id,
- user_channel_id: funded_chan.context.get_user_id(),
- new_funding_txo: splice_negotiated.funding_txo,
- channel_type: splice_negotiated.channel_type,
- new_funding_redeem_script: splice_negotiated.funding_redeem_script,
- },
- None,
- ));
+ if splice_negotiated.has_local_contribution {
+ self.pending_events.lock().unwrap().push_back((
+ events::Event::SpliceNegotiated {
+ channel_id,
+ counterparty_node_id: node_id,
+ user_channel_id: funded_chan.context.get_user_id(),
+ new_funding_txo: splice_negotiated.funding_txo,
+ channel_type: splice_negotiated.channel_type,
+ new_funding_redeem_script: splice_negotiated
+ .funding_redeem_script,
+ },
+ None,
+ ));
+ }
}
if let Some(broadcast_tx) = msgs.signed_closing_tx {
log_info!(logger, "Broadcasting closing tx {}", log_tx!(broadcast_tx));
diff --git a/lightning/src/ln/splicing_tests.rs b/lightning/src/ln/splicing_tests.rs
index 5fff8dc..b8a6e2b 100644
--- a/lightning/src/ln/splicing_tests.rs
+++ b/lightning/src/ln/splicing_tests.rs
@@ -703,7 +703,6 @@ pub fn splice_channel<'a, 'b, 'c, 'd>(
initiator: &'a Node<'b, 'c, 'd>, acceptor: &'a Node<'b, 'c, 'd>, channel_id: ChannelId,
funding_contribution: FundingContribution,
) -> (Transaction, ScriptBuf) {
- let node_id_initiator = initiator.node.get_our_node_id();
let node_id_acceptor = acceptor.node.get_our_node_id();
let new_funding_script = complete_splice_handshake(initiator, acceptor);
@@ -719,7 +718,7 @@ pub fn splice_channel<'a, 'b, 'c, 'd>(
assert!(splice_locked.is_none());
expect_splice_pending_event(initiator, &node_id_acceptor);
- expect_splice_pending_event(acceptor, &node_id_initiator);
+ assert!(acceptor.node.get_and_clear_pending_events().is_empty());
(splice_tx, new_funding_script)
}
@@ -1750,7 +1749,7 @@ fn fails_initiating_concurrent_splices(reconnect: bool) {
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_1_id);
- expect_splice_pending_event(&nodes[1], &node_0_id);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// Now that the splice is pending, another splice may be initiated.
assert!(nodes[0].node.splice_channel(&channel_id, &node_1_id).is_ok());
@@ -2024,7 +2023,7 @@ fn do_test_splice_tiebreak(
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
mine_transaction(&nodes[0], &tx);
mine_transaction(&nodes[1], &tx);
@@ -2071,7 +2070,7 @@ fn do_test_splice_tiebreak(
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[1], &node_id_0);
- expect_splice_pending_event(&nodes[0], &node_id_1);
+ assert!(nodes[0].node.get_and_clear_pending_events().is_empty());
mine_transaction(&nodes[1], &new_splice_tx);
mine_transaction(&nodes[0], &new_splice_tx);
@@ -2537,7 +2536,7 @@ fn do_test_splice_reestablish(reload: bool, async_monitor_update: bool) {
reconnect_nodes!(|reconnect_args: &mut ReconnectArgs| {
reconnect_args.send_interactive_tx_sigs = (false, true);
});
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// Reestablish the channel again to make sure node 0 doesn't retransmit `tx_signatures`
// unnecessarily as it was delivered in the previous reestablishment.
@@ -2931,7 +2930,7 @@ fn test_splice_reestablish_waits_for_holder_tx_signatures_before_commitment_sign
nodes[1].node.handle_tx_signatures(node_id_0, &initiator_tx_signatures);
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
}
#[test]
@@ -3035,7 +3034,7 @@ fn test_splice_reestablish_sends_commitment_signed_before_tx_signatures() {
nodes[1].node.handle_tx_signatures(node_id_0, &initiator_tx_signatures);
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
}
#[test]
@@ -4024,7 +4023,7 @@ fn acceptor_can_cancel_queued_funding_contributed_during_counterparty_splice() {
let (splice_tx, splice_locked) = sign_interactive_funding_tx(initiator, acceptor, false, None);
assert!(splice_locked.is_none());
expect_splice_pending_event(initiator, &node_id_acceptor);
- expect_splice_pending_event(acceptor, &node_id_initiator);
+ assert!(acceptor.node.get_and_clear_pending_events().is_empty());
mine_transaction(initiator, &splice_tx);
mine_transaction(acceptor, &splice_tx);
@@ -4495,7 +4494,7 @@ fn free_holding_cell_on_tx_signatures_quiescence_exit() {
}
expect_splice_pending_event(initiator, &node_id_acceptor);
- expect_splice_pending_event(acceptor, &node_id_initiator);
+ assert!(acceptor.node.get_and_clear_pending_events().is_empty());
}
#[test]
@@ -4975,7 +4974,7 @@ fn test_splice_buffer_commitment_signed_until_funding_tx_signed() {
}
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// Both nodes should broadcast the splice transaction.
let splice_tx = {
@@ -5217,7 +5216,7 @@ fn do_splice_waits_for_initial_commitment_monitor_update_before_releasing_tx_sig
expect_splice_pending_event(&nodes[0], &node_id_1);
if !complete_update_while_disconnected {
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
}
}
@@ -6140,7 +6139,7 @@ fn test_splice_rbf_acceptor_basic() {
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
let initial_channel_value_sat = 100_000;
@@ -6189,7 +6188,7 @@ fn test_splice_rbf_acceptor_basic() {
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// Step 11: Mine, lock, and verify DiscardFunding for the replaced splice candidate.
let result = lock_rbf_splice_after_blocks(
@@ -6221,7 +6220,7 @@ fn test_splice_rbf_discard_unique_contribution() {
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
let initial_channel_value_sat = 100_000;
@@ -6290,7 +6289,7 @@ fn test_splice_rbf_discard_unique_contribution() {
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
let result = lock_rbf_splice_after_blocks(
&nodes[0],
@@ -6322,7 +6321,7 @@ fn test_splice_rbf_at_high_feerate() {
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
let initial_channel_value_sat = 100_000;
@@ -6357,7 +6356,7 @@ fn test_splice_rbf_at_high_feerate() {
);
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// Step 3: RBF again using the template's min_rbf_feerate. The counterparty must accept it.
provide_utxo_reserves(&nodes, 2, added_value * 2);
@@ -6378,7 +6377,7 @@ fn test_splice_rbf_at_high_feerate() {
sign_interactive_funding_tx(&nodes[0], &nodes[1], false, Some(rbf_tx_1.compute_txid()));
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
}
#[test]
@@ -6579,7 +6578,7 @@ fn test_splice_rbf_insufficient_feerate_high() {
sign_interactive_funding_tx(&nodes[0], &nodes[1], false, Some(splice_tx.compute_txid()));
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// prev=1000: flat increment gives 1000+25=1025, 25/24 rule gives 1000*25/24=1041.
// Feerate 1025 satisfies the flat increment but not 25/24 — rejected.
@@ -7291,7 +7290,7 @@ pub fn do_test_splice_rbf_tiebreak(
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// Mine, lock, and verify DiscardFunding for the replaced splice candidate.
// Node 1's QuiescentAction was preserved, so after splice_locked it re-initiates
@@ -7354,7 +7353,7 @@ pub fn do_test_splice_rbf_tiebreak(
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[1], &node_id_0);
- expect_splice_pending_event(&nodes[0], &node_id_1);
+ assert!(nodes[0].node.get_and_clear_pending_events().is_empty());
// Mine and lock.
mine_transaction(&nodes[1], &new_splice_tx);
@@ -7853,7 +7852,7 @@ fn test_splice_rbf_sequential() {
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
let initial_channel_value_sat = 100_000;
@@ -7891,7 +7890,7 @@ fn test_splice_rbf_sequential() {
sign_interactive_funding_tx(&nodes[0], &nodes[1], false, Some(splice_tx_0.compute_txid()));
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// --- Round 2: RBF #2 at feerate 303. ---
provide_utxo_reserves(&nodes, 2, added_value * 2);
@@ -7912,7 +7911,7 @@ fn test_splice_rbf_sequential() {
sign_interactive_funding_tx(&nodes[0], &nodes[1], false, Some(splice_tx_1.compute_txid()));
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// --- Mine and lock the final RBF, verifying DiscardFunding for both replaced candidates. ---
let splice_tx_0_txid = splice_tx_0.compute_txid();
@@ -7938,7 +7937,7 @@ fn test_splice_rbf_amends_prior_net_positive_contribution_request() {
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
let (_, _, channel_id, _) =
@@ -7981,7 +7980,7 @@ fn test_splice_rbf_amends_prior_net_positive_contribution_request() {
sign_interactive_funding_tx(&nodes[0], &nodes[1], false, Some(replaced_txid));
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
tx
};
@@ -8070,7 +8069,7 @@ fn test_splice_rbf_amends_prior_net_negative_contribution_request() {
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
let (_, _, channel_id, _) =
@@ -8115,7 +8114,7 @@ fn test_splice_rbf_amends_prior_net_negative_contribution_request() {
sign_interactive_funding_tx(&nodes[0], &nodes[1], false, Some(replaced_txid));
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
tx
};
@@ -9161,7 +9160,7 @@ fn test_splice_rbf_rejects_low_feerate_after_several_attempts() {
);
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
prev_feerate = feerate;
prev_splice_tx = rbf_tx;
}
@@ -9193,7 +9192,7 @@ fn test_splice_rbf_rejects_own_low_feerate_after_several_attempts() {
let node_chanmgrs = create_node_chanmgrs(2, &node_cfgs, &[None, None]);
let nodes = create_network(2, &node_cfgs, &node_chanmgrs);
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
let initial_channel_value_sat = 100_000;
@@ -9236,7 +9235,7 @@ fn test_splice_rbf_rejects_own_low_feerate_after_several_attempts() {
);
assert!(splice_locked.is_none());
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
prev_feerate = feerate;
prev_splice_tx = rbf_tx;
}
@@ -9306,10 +9305,10 @@ fn test_no_disconnect_after_splice_completes() {
let (_, splice_locked) = sign_interactive_funding_tx(&nodes[0], &nodes[1], false, None);
assert!(splice_locked.is_none());
- let node_id_0 = nodes[0].node.get_our_node_id();
+ let _node_id_0 = nodes[0].node.get_our_node_id();
let node_id_1 = nodes[1].node.get_our_node_id();
expect_splice_pending_event(&nodes[0], &node_id_1);
- expect_splice_pending_event(&nodes[1], &node_id_0);
+ assert!(nodes[1].node.get_and_clear_pending_events().is_empty());
// Fire enough ticks to trigger a disconnect if the timer wasn't properly cleared.
for _ in 0..DISCONNECT_PEER_AWAITING_RESPONSE_TICKS {
@@ -10448,7 +10447,6 @@ fn test_async_splice_receives_tx_signatures_while_unrelated_monitor_update_pendi
// monitor update. B's `tx_signatures` was already released, so there's no message to send and
// we should expect the splice negotiation to complete.
acceptor.node.handle_tx_signatures(initiator_node_id, &delayed_initiator_tx_signatures);
- expect_splice_pending_event(acceptor, &initiator_node_id);
// Finally, drive the state machines to completion.
acceptor.chain_monitor.complete_sole_pending_chan_update(&channel_id);
Why this scored 19/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.