@@ -239,7 +239,8 @@ impl<
239
239
G ,
240
240
& ' a ( dyn UtxoLookup + Send + Sync ) ,
241
241
L ,
242
- > where
242
+ >
243
+ where
243
244
L :: Target : Logger ,
244
245
{
245
246
/// Initializes a new [`GossipSync::Rapid`] variant.
@@ -256,7 +257,8 @@ impl<'a, L: Deref>
256
257
& ' a NetworkGraph < L > ,
257
258
& ' a ( dyn UtxoLookup + Send + Sync ) ,
258
259
L ,
259
- > where
260
+ >
261
+ where
260
262
L :: Target : Logger ,
261
263
{
262
264
/// Initializes a new [`GossipSync::None`] variant.
@@ -1162,7 +1164,7 @@ impl Drop for BackgroundProcessor {
1162
1164
}
1163
1165
}
1164
1166
1165
- #[ cfg( all( feature = "std" , test) ) ]
1167
+ #[ cfg( all( feature = "std" , feature = "time" , test) ) ]
1166
1168
mod tests {
1167
1169
use super :: { BackgroundProcessor , GossipSync , FRESHNESS_TIMER } ;
1168
1170
use bitcoin:: constants:: { genesis_block, ChainHash } ;
@@ -1207,7 +1209,8 @@ mod tests {
1207
1209
use lightning:: util:: sweep:: { OutputSpendStatus , OutputSweeperSync , PRUNE_DELAY_BLOCKS } ;
1208
1210
use lightning:: util:: test_utils;
1209
1211
use lightning:: { get_event, get_event_msg} ;
1210
- use lightning_liquidity:: lsps5:: service:: TimeProvider ;
1212
+ #[ cfg( feature = "time" ) ]
1213
+ use lightning_liquidity:: lsps5:: service:: DefaultTimeProvider ;
1211
1214
use lightning_liquidity:: LiquidityManager ;
1212
1215
use lightning_persister:: fs_store:: FilesystemStore ;
1213
1216
use lightning_rapid_gossip_sync:: RapidGossipSync ;
@@ -1650,16 +1653,6 @@ mod tests {
1650
1653
path. to_str ( ) . unwrap ( ) . to_string ( )
1651
1654
}
1652
1655
1653
- pub struct DefaultTimeProvider ;
1654
-
1655
- #[ cfg( feature = "std" ) ]
1656
- impl TimeProvider for DefaultTimeProvider {
1657
- fn duration_since_epoch ( & self ) -> Duration {
1658
- use std:: time:: { SystemTime , UNIX_EPOCH } ;
1659
- SystemTime :: now ( ) . duration_since ( UNIX_EPOCH ) . expect ( "system time before Unix epoch" )
1660
- }
1661
- }
1662
-
1663
1656
fn create_nodes ( num_nodes : usize , persist_dir : & str ) -> ( String , Vec < Node > ) {
1664
1657
let persist_temp_path = env:: temp_dir ( ) . join ( persist_dir) ;
1665
1658
let persist_dir = persist_temp_path. to_string_lossy ( ) . to_string ( ) ;
@@ -1761,15 +1754,13 @@ mod tests {
1761
1754
Arc :: clone ( & logger) ,
1762
1755
Arc :: clone ( & keys_manager) ,
1763
1756
) ) ;
1764
- let time_provider = Arc :: new ( DefaultTimeProvider ) ;
1765
- let liquidity_manager = Arc :: new ( LiquidityManager :: new_with_custom_time_provider (
1757
+ let liquidity_manager = Arc :: new ( LiquidityManager :: new (
1766
1758
Arc :: clone ( & keys_manager) ,
1767
1759
Arc :: clone ( & manager) ,
1768
1760
None ,
1769
1761
None ,
1770
1762
None ,
1771
1763
None ,
1772
- time_provider,
1773
1764
) ) ;
1774
1765
let node = Node {
1775
1766
node : manager,
0 commit comments