@@ -181,12 +181,14 @@ impl Builder {
181
181
let entropy_source_config = self . entropy_source_config . read ( ) . unwrap ( ) ;
182
182
let chain_data_source_config = self . chain_data_source_config . read ( ) . unwrap ( ) ;
183
183
let gossip_source_config = self . gossip_source_config . read ( ) . unwrap ( ) ;
184
+ let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
184
185
Arc :: new ( build_with_store_internal (
185
186
config,
186
187
entropy_source_config. as_ref ( ) ,
187
188
chain_data_source_config. as_ref ( ) ,
188
189
gossip_source_config. as_ref ( ) ,
189
190
kv_store,
191
+ runtime,
190
192
) )
191
193
}
192
194
}
@@ -196,6 +198,7 @@ fn build_with_store_internal<'a, K: KVStore + Sync + Send + 'static>(
196
198
config : Arc < Config > , entropy_source_config : Option < & ' a EntropySourceConfig > ,
197
199
chain_data_source_config : Option < & ' a ChainDataSourceConfig > ,
198
200
gossip_source_config : Option < & ' a GossipSourceConfig > , kv_store : Arc < K > ,
201
+ runtime : Arc < RwLock < Option < tokio:: runtime:: Runtime > > > ,
199
202
) -> Node < K > {
200
203
let ldk_data_dir = format ! ( "{}/ldk" , config. storage_dir_path) ;
201
204
fs:: create_dir_all ( ldk_data_dir. clone ( ) ) . expect ( "Failed to create LDK data directory" ) ;
@@ -265,7 +268,6 @@ fn build_with_store_internal<'a, K: KVStore + Sync + Send + 'static>(
265
268
}
266
269
} ;
267
270
268
- let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
269
271
let wallet =
270
272
Arc :: new ( Wallet :: new ( blockchain, bdk_wallet, Arc :: clone ( & runtime) , Arc :: clone ( & logger) ) ) ;
271
273
0 commit comments