- let events = nodes[1].node.get_and_clear_pending_msg_events();
- assert_eq!(events.len(), 2);
- match events[0] {
- MessageSendEvent::BroadcastChannelUpdate { .. } => {},
- _ => panic!("Unexpected event"),
- }
- match events [1] {
- MessageSendEvent::HandleError { ref action, .. } => {
- match action {
- &ErrorAction::SendErrorMessage { ref msg } => {
- assert_eq!(msg.data, "Peer attempted to reestablish channel with a very old local commitment transaction"); },
- _ => panic!("Unexpected event!"),
- }
- },
- _ => panic!("Unexpected event"),
- }
+ assert_eq!(check_closed_broadcast!(nodes[1], true).unwrap().data, "Peer attempted to reestablish channel with a very old local commitment transaction");
+ check_added_monitors!(nodes[1], 1);
+