@@ -45,6 +45,7 @@ use lightning::ln::peer_handler::CustomMessageHandler;
4545use lightning:: ln:: wire:: CustomMessageReader ;
4646use lightning:: sign:: { EntropySource , NodeSigner } ;
4747use lightning:: util:: logger:: Level ;
48+ use lightning:: util:: persist:: KVStore ;
4849use lightning:: util:: ser:: { LengthLimitedRead , LengthReadable } ;
4950use lightning:: util:: wakers:: Future ;
5051
@@ -195,6 +196,7 @@ pub struct LiquidityManager<
195196 _client_config : Option < LiquidityClientConfig > ,
196197 best_block : RwLock < Option < BestBlock > > ,
197198 _chain_source : Option < C > ,
199+ kv_store : Arc < dyn KVStore + Send + Sync > ,
198200}
199201
200202#[ cfg( feature = "time" ) ]
@@ -209,7 +211,8 @@ where
209211 /// Constructor for the [`LiquidityManager`] using the default system clock
210212 pub fn new (
211213 entropy_source : ES , node_signer : NS , channel_manager : CM , chain_source : Option < C > ,
212- chain_params : Option < ChainParameters > , service_config : Option < LiquidityServiceConfig > ,
214+ chain_params : Option < ChainParameters > , kv_store : Arc < dyn KVStore + Send + Sync > ,
215+ service_config : Option < LiquidityServiceConfig > ,
213216 client_config : Option < LiquidityClientConfig > ,
214217 ) -> Self {
215218 let time_provider = Arc :: new ( DefaultTimeProvider ) ;
@@ -219,6 +222,7 @@ where
219222 channel_manager,
220223 chain_source,
221224 chain_params,
225+ kv_store,
222226 service_config,
223227 client_config,
224228 time_provider,
@@ -248,7 +252,8 @@ where
248252 /// [`LiquidityClientConfig`] and [`LiquidityServiceConfig`].
249253 pub fn new_with_custom_time_provider (
250254 entropy_source : ES , node_signer : NS , channel_manager : CM , chain_source : Option < C > ,
251- chain_params : Option < ChainParameters > , service_config : Option < LiquidityServiceConfig > ,
255+ chain_params : Option < ChainParameters > , kv_store : Arc < dyn KVStore + Send + Sync > ,
256+ service_config : Option < LiquidityServiceConfig > ,
252257 client_config : Option < LiquidityClientConfig > , time_provider : TP ,
253258 ) -> Self {
254259 let pending_messages = Arc :: new ( MessageQueue :: new ( ) ) ;
@@ -373,6 +378,7 @@ where
373378 _client_config : client_config,
374379 best_block : RwLock :: new ( chain_params. map ( |chain_params| chain_params. best_block ) ) ,
375380 _chain_source : chain_source,
381+ kv_store,
376382 }
377383 }
378384
0 commit comments