Skip to content

Commit 5b85deb

Browse files
fixup: making ci happy
1 parent d88d594 commit 5b85deb

File tree

2 files changed

+10
-12
lines changed

2 files changed

+10
-12
lines changed

lightning/src/ln/functional_test_utils.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1805,8 +1805,8 @@ pub fn create_chan_between_nodes_with_value_a<'a, 'b, 'c: 'd, 'd>(
18051805
}
18061806

18071807
pub fn create_channel_manual_funding<'a, 'b, 'c: 'd, 'd>(
1808-
nodes: &'a Vec<Node<'b, 'c, 'd>>, initiator: usize, counterparty: usize,
1809-
channel_value: u64, push_msat: u64,
1808+
nodes: &'a Vec<Node<'b, 'c, 'd>>, initiator: usize, counterparty: usize, channel_value: u64,
1809+
push_msat: u64,
18101810
) -> (ChannelId, Transaction, OutPoint) {
18111811
let node_a = &nodes[initiator];
18121812
let node_b = &nodes[counterparty];
@@ -1829,14 +1829,12 @@ pub fn create_channel_manual_funding<'a, 'b, 'c: 'd, 'd>(
18291829
.unwrap();
18301830
check_added_monitors!(node_a, 0);
18311831

1832-
let funding_created =
1833-
get_event_msg!(node_a, MessageSendEvent::SendFundingCreated, node_b_id);
1832+
let funding_created = get_event_msg!(node_a, MessageSendEvent::SendFundingCreated, node_b_id);
18341833
node_b.node.handle_funding_created(node_a_id, &funding_created);
18351834
check_added_monitors!(node_b, 1);
18361835
let channel_id_b = expect_channel_pending_event(node_b, &node_a_id);
18371836

1838-
let funding_signed =
1839-
get_event_msg!(node_b, MessageSendEvent::SendFundingSigned, node_a_id);
1837+
let funding_signed = get_event_msg!(node_b, MessageSendEvent::SendFundingSigned, node_a_id);
18401838
node_a.node.handle_funding_signed(node_b_id, &funding_signed);
18411839
check_added_monitors!(node_a, 1);
18421840

@@ -1849,7 +1847,7 @@ pub fn create_channel_manual_funding<'a, 'b, 'c: 'd, 'd>(
18491847
Event::FundingTxBroadcastSafe { funding_txo, counterparty_node_id, .. } => {
18501848
assert_eq!(counterparty_node_id, node_b_id);
18511849
assert_eq!(funding_txo.txid, funding_txid);
1852-
assert_eq!(funding_txo.vout, funding_outpoint.index.into());
1850+
assert_eq!(funding_txo.vout, u32::from(funding_outpoint.index));
18531851
},
18541852
Event::ChannelPending { channel_id: pending_id, counterparty_node_id, .. } => {
18551853
assert_eq!(counterparty_node_id, node_b_id);

lightning/src/ln/functional_tests.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ pub fn test_justice_tx_htlc_timeout() {
832832
revoked_local_txn[1].input[0].witness.last().unwrap().len(),
833833
OFFERED_HTLC_SCRIPT_WEIGHT
834834
); // HTLC-Timeout
835-
// Revoke the old state
835+
// Revoke the old state
836836
claim_payment(&nodes[0], &[&nodes[1]], payment_preimage_3);
837837

838838
{
@@ -6029,7 +6029,7 @@ pub fn test_announce_disable_channels() {
60296029
match e {
60306030
MessageSendEvent::BroadcastChannelUpdate { ref msg } => {
60316031
assert_eq!(msg.contents.channel_flags & (1 << 1), 1 << 1); // The "channel disabled" bit should be set
6032-
// Check that each channel gets updated exactly once
6032+
// Check that each channel gets updated exactly once
60336033
if chans_disabled
60346034
.insert(msg.contents.short_channel_id, msg.contents.timestamp)
60356035
.is_some()
@@ -9692,15 +9692,15 @@ fn test_manual_broadcast_skips_commitment_until_funding_seen() {
96929692
.find(|tx| {
96939693
tx.input.iter().any(|input| {
96949694
input.previous_output.txid == funding_txid
9695-
&& input.previous_output.vout == funding_outpoint.index.into()
9695+
&& input.previous_output.vout == u32::from(funding_outpoint.index)
96969696
})
96979697
})
96989698
.expect("commitment transaction not broadcast");
96999699
check_spends!(commitment_tx, funding_tx);
97009700
assert_eq!(commitment_tx.input.len(), 1);
97019701
let commitment_input = &commitment_tx.input[0];
97029702
assert_eq!(commitment_input.previous_output.txid, funding_txid);
9703-
assert_eq!(commitment_input.previous_output.vout, funding_outpoint.index.into());
9703+
assert_eq!(commitment_input.previous_output.vout, u32::from(funding_outpoint.index));
97049704

97059705
let monitor_events = nodes[0].chain_monitor.chain_monitor.get_and_clear_pending_events();
97069706
assert!(monitor_events.iter().all(|event| !matches!(event, Event::BumpTransaction(_))));
@@ -9761,7 +9761,7 @@ fn test_manual_broadcast_detects_funding_and_broadcasts_on_timeout() {
97619761
.find(|tx| {
97629762
tx.input.iter().any(|input| {
97639763
input.previous_output.txid == funding_txid
9764-
&& input.previous_output.vout == funding_outpoint.index.into()
9764+
&& input.previous_output.vout == u32::from(funding_outpoint.index)
97659765
})
97669766
})
97679767
.expect("commitment transaction not broadcast");

0 commit comments

Comments
 (0)