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 {
2532
2532
assert ! ( network_graph. update_channel_from_announcement( & valid_channel_announcement, & chain_source) . is_ok( ) ) ;
2533
2533
assert ! ( network_graph. read_only( ) . channels( ) . get( & short_channel_id) . is_some( ) ) ;
2534
2534
2535
+ // Submit two channel updates for each channel direction (update.flags bit).
2535
2536
let valid_channel_update = get_signed_channel_update ( |_| { } , node_1_privkey, & secp_ctx) ;
2536
2537
assert ! ( gossip_sync. handle_channel_update( & valid_channel_update) . is_ok( ) ) ;
2537
2538
assert ! ( network_graph. read_only( ) . channels( ) . get( & short_channel_id) . unwrap( ) . one_to_two. is_some( ) ) ;
2538
2539
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
+
2539
2544
network_graph. remove_stale_channels_and_tracking_with_time ( 100 + STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS ) ;
2540
2545
assert_eq ! ( network_graph. read_only( ) . channels( ) . len( ) , 1 ) ;
2541
2546
assert_eq ! ( network_graph. read_only( ) . nodes( ) . len( ) , 2 ) ;
You can’t perform that action at this time.
0 commit comments