use chain::{Confirm, Watch};
use ln::channelmanager::{ChannelManager, ChannelManagerReadArgs};
use ln::features::InitFeatures;
-use ln::msgs::{ChannelMessageHandler, ErrorAction, HTLCFailChannelUpdate};
+use ln::msgs::{ChannelMessageHandler, ErrorAction};
+use routing::network_graph::NetworkUpdate;
use util::enforcing_trait_impls::EnforcingSigner;
use util::events::{Event, MessageSendEvent, MessageSendEventsProvider};
use util::test_utils;
connect_block(&nodes[1], &block);
// ChannelManager only polls chain::Watch::release_pending_monitor_events when we
- // probe it for events, so we probe non-message events here (which should still end up empty):
- assert_eq!(nodes[1].node.get_and_clear_pending_events().len(), 0);
+ // probe it for events, so we probe non-message events here (which should just be the
+ // PaymentForwarded event).
+ expect_payment_forwarded!(nodes[1], Some(1000), true);
} else {
// Confirm the timeout tx and check that we fail the HTLC backwards
let block = Block {
if claim {
expect_payment_sent!(nodes[0], our_payment_preimage);
} else {
- let events = nodes[0].node.get_and_clear_pending_msg_events();
- assert_eq!(events.len(), 1);
- if let MessageSendEvent::PaymentFailureNetworkUpdate { update: HTLCFailChannelUpdate::ChannelClosed { ref is_permanent, .. } } = events[0] {
- assert!(is_permanent);
- } else { panic!("Unexpected event!"); }
- expect_payment_failed!(nodes[0], our_payment_hash, false);
+ expect_payment_failed_with_update!(nodes[0], our_payment_hash, false, chan_2.0.contents.short_channel_id, true);
}
}