@@ -843,7 +843,7 @@ impl<G: Deref<Target = NetworkGraph<L>>, U: UtxoLookup, L: Logger> BaseMessageHa
843843 let mut gossip_start_time = 0 ;
844844 #[ allow( unused) ]
845845 let should_sync = self . should_request_full_sync ( ) ;
846- #[ cfg( feature = "std" ) ]
846+ #[ cfg( all ( feature = "std" , not ( fuzzing ) ) ) ]
847847 {
848848 gossip_start_time = SystemTime :: now ( )
849849 . duration_since ( UNIX_EPOCH )
@@ -2195,7 +2195,7 @@ impl<L: Logger> NetworkGraph<L> {
21952195
21962196 #[ allow( unused_mut, unused_assignments) ]
21972197 let mut announcement_received_time = 0 ;
2198- #[ cfg( feature = "std" ) ]
2198+ #[ cfg( all ( feature = "std" , not ( fuzzing ) ) ) ]
21992199 {
22002200 announcement_received_time = SystemTime :: now ( )
22012201 . duration_since ( UNIX_EPOCH )
@@ -2235,11 +2235,11 @@ impl<L: Logger> NetworkGraph<L> {
22352235 ///
22362236 /// The channel and any node for which this was their last channel are removed from the graph.
22372237 pub fn channel_failed_permanent ( & self , short_channel_id : u64 ) {
2238- #[ cfg( feature = "std" ) ]
2238+ #[ cfg( all ( feature = "std" , not ( fuzzing ) ) ) ]
22392239 let current_time_unix = Some (
22402240 SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . expect ( "Time must be > 1970" ) . as_secs ( ) ,
22412241 ) ;
2242- #[ cfg( not( feature = "std" ) ) ]
2242+ #[ cfg( any ( not( feature = "std" ) , fuzzing ) ) ]
22432243 let current_time_unix = None ;
22442244
22452245 self . channel_failed_permanent_with_time ( short_channel_id, current_time_unix)
@@ -2262,11 +2262,11 @@ impl<L: Logger> NetworkGraph<L> {
22622262 /// Marks a node in the graph as permanently failed, effectively removing it and its channels
22632263 /// from local storage.
22642264 pub fn node_failed_permanent ( & self , node_id : & PublicKey ) {
2265- #[ cfg( feature = "std" ) ]
2265+ #[ cfg( all ( feature = "std" , not ( fuzzing ) ) ) ]
22662266 let current_time_unix = Some (
22672267 SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . expect ( "Time must be > 1970" ) . as_secs ( ) ,
22682268 ) ;
2269- #[ cfg( not( feature = "std" ) ) ]
2269+ #[ cfg( any ( not( feature = "std" ) , fuzzing ) ) ]
22702270 let current_time_unix = None ;
22712271
22722272 let node_id = NodeId :: from_pubkey ( node_id) ;
@@ -2318,8 +2318,9 @@ impl<L: Logger> NetworkGraph<L> {
23182318 /// This method will also cause us to stop tracking removed nodes and channels if they have been
23192319 /// in the map for a while so that these can be resynced from gossip in the future.
23202320 ///
2321- /// This method is only available with the `std` feature. See
2321+ /// This method is only available with the `std` feature (and not during fuzzing) . See
23222322 /// [`NetworkGraph::remove_stale_channels_and_tracking_with_time`] for non-`std` use.
2323+ #[ cfg( not( fuzzing) ) ]
23232324 pub fn remove_stale_channels_and_tracking ( & self ) {
23242325 let time =
23252326 SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . expect ( "Time must be > 1970" ) . as_secs ( ) ;
@@ -2476,7 +2477,7 @@ impl<L: Logger> NetworkGraph<L> {
24762477 } ) ;
24772478 }
24782479
2479- #[ cfg( all( feature = "std" , not( test) , not( feature = "_test_utils" ) ) ) ]
2480+ #[ cfg( all( feature = "std" , not( test) , not( feature = "_test_utils" ) , not ( fuzzing ) ) ) ]
24802481 {
24812482 // Note that many tests rely on being able to set arbitrarily old timestamps, thus we
24822483 // disable this check during tests!
0 commit comments