File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -2573,13 +2573,18 @@ mod tests {
2573
2573
assert ! ( gossip_sync. handle_channel_update( & valid_channel_update) . is_ok( ) ) ;
2574
2574
assert ! ( network_graph. read_only( ) . channels( ) . get( & short_channel_id) . unwrap( ) . one_to_two. is_some( ) ) ;
2575
2575
2576
- network_graph. remove_stale_channels_and_tracking_with_time ( 100 + STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS ) ;
2577
- assert_eq ! ( network_graph. read_only( ) . channels( ) . len( ) , 1 ) ;
2578
- assert_eq ! ( network_graph. read_only( ) . nodes( ) . len( ) , 2 ) ;
2576
+ #[ cfg( not( feature = "std" ) ) ] {
2577
+ // t=0 is the default announcement time.
2578
+ network_graph. remove_stale_channels_and_tracking_with_time ( 0 + STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS ) ;
2579
+ assert_eq ! ( network_graph. read_only( ) . channels( ) . len( ) , 1 ) ;
2580
+ assert_eq ! ( network_graph. read_only( ) . nodes( ) . len( ) , 2 ) ;
2581
+ network_graph. remove_stale_channels_and_tracking_with_time ( 1 + STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS ) ;
2582
+ }
2579
2583
2580
- network_graph. remove_stale_channels_and_tracking_with_time ( 101 + STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS ) ;
2581
2584
#[ cfg( feature = "std" ) ]
2582
2585
{
2586
+ // t=100 is the default announcement time.
2587
+ network_graph. remove_stale_channels_and_tracking_with_time ( 100 + 1 + STALE_CHANNEL_UPDATE_AGE_LIMIT_SECS ) ;
2583
2588
// In std mode, a further check is performed before fully removing the channel -
2584
2589
// the channel_announcement must have been received at least two weeks ago. We
2585
2590
// fudge that here by indicating the time has jumped two weeks. Note that the
You can’t perform that action at this time.
0 commit comments