Wait to free the holding cell during channel_reestablish handling
[rust-lightning] / lightning / src / ln / chanmon_update_fail_tests.rs
index f16041d2a3cc76ddb6ab9ab7bfbdd9c76b123027..e78b8999f7ec88c6047b5e5297c75a4b9d332fac 100644 (file)
@@ -1128,6 +1128,7 @@ fn test_monitor_update_fail_reestablish() {
                get_event_msg!(nodes[0], MessageSendEvent::SendChannelUpdate, nodes[1].node.get_our_node_id())
                        .contents.flags & 2, 0); // The "disabled" bit should be unset as we just reconnected
 
+       nodes[1].node.get_and_clear_pending_msg_events(); // Free the holding cell
        check_added_monitors!(nodes[1], 1);
 
        nodes[1].node.peer_disconnected(&nodes[0].node.get_our_node_id(), false);