Builder for creating static invoices from offers
[rust-lightning] / lightning / src / ln / reload_tests.rs
index a490b145e4b79652e09caf282a46037c7d3175a8..4c32a0bd0700730f3046c2976cb1ab617e58d5ef 100644 (file)
@@ -16,7 +16,8 @@ use crate::sign::EntropySource;
 use crate::chain::transaction::OutPoint;
 use crate::events::{ClosureReason, Event, HTLCDestination, MessageSendEvent, MessageSendEventsProvider};
 use crate::ln::channelmanager::{ChannelManager, ChannelManagerReadArgs, PaymentId, RecipientOnionFields};
-use crate::ln::{msgs, ChannelId};
+use crate::ln::msgs;
+use crate::ln::types::ChannelId;
 use crate::ln::msgs::{ChannelMessageHandler, RoutingMessageHandler, ErrorAction};
 use crate::util::test_channel_signer::TestChannelSigner;
 use crate::util::test_utils;
@@ -642,8 +643,8 @@ fn do_test_data_loss_protect(reconnect_panicing: bool, substantially_old: bool,
                        if let MessageSendEvent::BroadcastChannelUpdate { .. } = msg {
                        } else if let MessageSendEvent::HandleError { ref action, .. } = msg {
                                match action {
-                                       &ErrorAction::DisconnectPeer { ref msg } => {
-                                               assert_eq!(msg.as_ref().unwrap().data, "Channel force-closed");
+                                       &ErrorAction::SendErrorMessage { ref msg } => {
+                                               assert_eq!(&msg.data, "Channel force-closed");
                                        },
                                        _ => panic!("Unexpected event!"),
                                }