File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -7589,6 +7589,7 @@ fn test_announce_disable_channels() {
7589
7589
for e in msg_events {
7590
7590
match e {
7591
7591
MessageSendEvent :: BroadcastChannelUpdate { ref msg } => {
7592
+ assert_eq ! ( msg. contents. flags & ( 1 <<1 ) , 1 <<1 ) ; // The "channel disabled" bit should be set
7592
7593
let short_id = msg. contents . short_channel_id ;
7593
7594
// Check generated channel_update match list in PendingChannelUpdate
7594
7595
if short_id != short_id_1 && short_id != short_id_2 && short_id != short_id_3 {
@@ -7624,6 +7625,22 @@ fn test_announce_disable_channels() {
7624
7625
7625
7626
nodes[ 0 ] . node . timer_tick_occurred ( ) ;
7626
7627
assert ! ( nodes[ 0 ] . node. get_and_clear_pending_msg_events( ) . is_empty( ) ) ;
7628
+ nodes[ 0 ] . node . timer_tick_occurred ( ) ;
7629
+ let msg_events = nodes[ 0 ] . node . get_and_clear_pending_msg_events ( ) ;
7630
+ assert_eq ! ( msg_events. len( ) , 3 ) ;
7631
+ for e in msg_events {
7632
+ match e {
7633
+ MessageSendEvent :: BroadcastChannelUpdate { ref msg } => {
7634
+ assert_eq ! ( msg. contents. flags & ( 1 <<1 ) , 0 ) ; // The channel disabled" bit should be off
7635
+ let short_id = msg. contents . short_channel_id ;
7636
+ // Check generated channel_update match list in PendingChannelUpdate
7637
+ if short_id != short_id_1 && short_id != short_id_2 && short_id != short_id_3 {
7638
+ panic ! ( "Generated ChannelUpdate for wrong chan!" ) ;
7639
+ }
7640
+ } ,
7641
+ _ => panic ! ( "Unexpected event" ) ,
7642
+ }
7643
+ }
7627
7644
}
7628
7645
7629
7646
#[ test]
You can’t perform that action at this time.
0 commit comments