File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -2532,10 +2532,15 @@ mod tests {
25322532 assert ! ( network_graph. update_channel_from_announcement( & valid_channel_announcement, & chain_source) . is_ok( ) ) ;
25332533 assert ! ( network_graph. read_only( ) . channels( ) . get( & short_channel_id) . is_some( ) ) ;
25342534
2535+ // Submit two channel updates for each channel direction (update.flags bit).
25352536 let valid_channel_update = get_signed_channel_update ( |_| { } , node_1_privkey, & secp_ctx) ;
25362537 assert ! ( gossip_sync. handle_channel_update( & valid_channel_update) . is_ok( ) ) ;
25372538 assert ! ( network_graph. read_only( ) . channels( ) . get( & short_channel_id) . unwrap( ) . one_to_two. is_some( ) ) ;
25382539
2540+ let valid_channel_update_2 = get_signed_channel_update ( |update| { update. flags |=1 ; } , node_2_privkey, & secp_ctx) ;
2541+ gossip_sync. handle_channel_update ( & valid_channel_update_2) . unwrap ( ) ;
2542+ assert ! ( network_graph. read_only( ) . channels( ) . get( & short_channel_id) . unwrap( ) . two_to_one. is_some( ) ) ;
2543+
25392544 network_graph. remove_stale_channels_and_tracking_with_time ( 100 + STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS ) ;
25402545 assert_eq ! ( network_graph. read_only( ) . channels( ) . len( ) , 1 ) ;
25412546 assert_eq ! ( network_graph. read_only( ) . nodes( ) . len( ) , 2 ) ;
You can’t perform that action at this time.
0 commit comments