Skip to content

Commit

Permalink
update test_channel_update_cached to remove internal dependency of
Browse files Browse the repository at this point in the history
channelmanager
  • Loading branch information
srikanth-iyengar committed Apr 19, 2024
1 parent d30d22e commit f585d35
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lightning/src/ln/channelmanager_limits_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ fn test_channel_update_cached() {

let chan = create_announced_chan_between_nodes(&nodes, 0, 1);

nodes[0].node.force_close_channel_with_peer(&chan.2, &nodes[1].node.get_our_node_id(), None, true).unwrap();
let _ = nodes[0].node.force_close_broadcasting_latest_txn(&chan.2, &nodes[1].node.get_our_node_id());
check_added_monitors!(nodes[0], 1);
check_closed_event!(nodes[0], 1, ClosureReason::HolderForceClosed, [nodes[1].node.get_our_node_id()], 100000);

Expand All @@ -673,8 +673,8 @@ fn test_channel_update_cached() {

{
// Assert that ChannelUpdate message has been added to node[0] pending broadcast messages
let pending_broadcast_messages= nodes[0].node.pending_broadcast_messages.lock().unwrap();
assert_eq!(pending_broadcast_messages.len(), 1);
let pending_broadcast_messages = nodes[0].node.get_and_clear_pending_msg_events();
assert_eq!(pending_broadcast_messages.len(), 2);
}

// Test that we do not retrieve the pending broadcast messages when we are not connected to any peer
Expand Down Expand Up @@ -704,7 +704,7 @@ fn test_channel_update_cached() {
}
{
// Assert that ChannelUpdate message has been cleared from nodes[0] pending broadcast messages
let pending_broadcast_messages= nodes[0].node.pending_broadcast_messages.lock().unwrap();
let pending_broadcast_messages= nodes[0].node.get_and_clear_pending_msg_events();
assert_eq!(pending_broadcast_messages.len(), 0);
}
}

0 comments on commit f585d35

Please sign in to comment.