Skip to content

Commit f585d35

Browse files
update test_channel_update_cached to remove internal dependency of
channelmanager
1 parent d30d22e commit f585d35

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lightning/src/ln/channelmanager_limits_tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ fn test_channel_update_cached() {
663663

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

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

@@ -673,8 +673,8 @@ fn test_channel_update_cached() {
673673

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

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

0 commit comments

Comments
 (0)