@@ -199,12 +199,14 @@ impl Builder {
199
199
let entropy_source_config = self . entropy_source_config . read ( ) . unwrap ( ) ;
200
200
let chain_data_source_config = self . chain_data_source_config . read ( ) . unwrap ( ) ;
201
201
let gossip_source_config = self . gossip_source_config . read ( ) . unwrap ( ) ;
202
+ let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
202
203
Arc :: new ( build_with_store_internal (
203
204
config,
204
205
entropy_source_config. as_ref ( ) ,
205
206
chain_data_source_config. as_ref ( ) ,
206
207
gossip_source_config. as_ref ( ) ,
207
208
kv_store,
209
+ runtime,
208
210
) )
209
211
}
210
212
}
@@ -214,6 +216,7 @@ fn build_with_store_internal<'a, K: KVStore + Sync + Send + 'static>(
214
216
config : Arc < Config > , entropy_source_config : Option < & ' a EntropySourceConfig > ,
215
217
chain_data_source_config : Option < & ' a ChainDataSourceConfig > ,
216
218
gossip_source_config : Option < & ' a GossipSourceConfig > , kv_store : Arc < K > ,
219
+ runtime : Arc < RwLock < Option < tokio:: runtime:: Runtime > > > ,
217
220
) -> Node < K > {
218
221
let ldk_data_dir = format ! ( "{}/ldk" , config. storage_dir_path) ;
219
222
fs:: create_dir_all ( ldk_data_dir. clone ( ) ) . expect ( "Failed to create LDK data directory" ) ;
@@ -287,7 +290,6 @@ fn build_with_store_internal<'a, K: KVStore + Sync + Send + 'static>(
287
290
}
288
291
} ;
289
292
290
- let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
291
293
let wallet =
292
294
Arc :: new ( Wallet :: new ( blockchain, bdk_wallet, Arc :: clone ( & runtime) , Arc :: clone ( & logger) ) ) ;
293
295
0 commit comments