Send channel_{announcement,update} msgs on connection, not timer
[rust-lightning] / lightning / src / ln / payment_tests.rs
index 315f76635c2bc77a4cafc8350aefa7cf7cd4dfd1..c6c4338cf49afa644dbe8a4c3c3a88b3657a34ed 100644 (file)
@@ -457,7 +457,7 @@ fn do_retry_with_no_persist(confirm_before_reload: bool) {
        // Now nodes[1] should send a channel reestablish, which nodes[0] will respond to with an
        // error, as the channel has hit the chain.
        nodes[1].node.peer_connected(&nodes[0].node.get_our_node_id(), &msgs::Init { features: InitFeatures::known(), remote_network_address: None });
-       let bs_reestablish = get_event_msg!(nodes[1], MessageSendEvent::SendChannelReestablish, nodes[0].node.get_our_node_id());
+       let bs_reestablish = get_chan_reestablish_msgs!(nodes[1], nodes[0]).pop().unwrap();
        nodes[0].node.handle_channel_reestablish(&nodes[1].node.get_our_node_id(), &bs_reestablish);
        let as_err = nodes[0].node.get_and_clear_pending_msg_events();
        assert_eq!(as_err.len(), 1);