let forwarded_events = nodes[1].node.get_and_clear_pending_events();
assert_eq!(forwarded_events.len(), 3);
match forwarded_events[0] {
- Event::ChannelClosed { .. } => {}
+ Event::ChannelClosed { reason: ClosureReason::CommitmentTxBroadcasted, .. } => {}
_ => panic!("Unexpected event"),
}
if let Event::PaymentForwarded { fee_earned_msat: Some(1000), claim_from_onchain_tx: true } = forwarded_events[1] {
assert_eq!(payment_preimage, our_payment_preimage_2);
}
},
- Event::ChannelClosed { .. } => {},
+ Event::ChannelClosed { reason: ClosureReason::CommitmentTxBroadcasted, .. } => {},
_ => panic!("Unexpected event"),
}
}
let events = nodes[1].node.get_and_clear_pending_events();
assert_eq!(events.len(), if deliver_bs_raa { 2 } else { 3 });
match events[0] {
- Event::ChannelClosed { .. } => { },
+ Event::ChannelClosed { reason: ClosureReason::CommitmentTxBroadcasted, .. } => { },
_ => panic!("Unexepected event"),
}
match events[1] {
_ => panic!("Unexpected event"),
}
match events[1] {
- Event::ChannelClosed { .. } => {}
- _ => panic!("Unexpected event"),
+ Event::ChannelClosed { reason: ClosureReason::ProcessingError { ref err }, .. } => {
+ assert_eq!(err, "Remote side tried to send a 0-msat HTLC");
+ },
+ _ => panic!("Unexpected event {:?}", events[1]),
}
check_closed_broadcast!(nodes[0], true);
check_added_monitors!(nodes[0], 1);
let events = nodes[1].node.get_and_clear_pending_events();
assert_eq!(events.len(), 2);
match events[0] {
- Event::ChannelClosed { .. } => {}
+ Event::ChannelClosed { reason: ClosureReason::CommitmentTxBroadcasted, .. } => {}
_ => panic!("Unexpected event"),
}
match events[1] {
let events = nodes[0].node.get_and_clear_pending_events();
expect_pending_htlcs_forwardable_from_events!(nodes[0], events[0..1], true);
match events[1] {
- Event::ChannelClosed { .. } => {}
+ Event::ChannelClosed { reason: ClosureReason::CommitmentTxBroadcasted, .. } => {}
_ => panic!("Unexpected event"),
}
let first;