@@ -181,12 +181,14 @@ impl Builder {
181181 let entropy_source_config = self . entropy_source_config . read ( ) . unwrap ( ) ;
182182 let chain_data_source_config = self . chain_data_source_config . read ( ) . unwrap ( ) ;
183183 let gossip_source_config = self . gossip_source_config . read ( ) . unwrap ( ) ;
184+ let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
184185 Arc :: new ( build_with_store_internal (
185186 config,
186187 entropy_source_config. as_ref ( ) ,
187188 chain_data_source_config. as_ref ( ) ,
188189 gossip_source_config. as_ref ( ) ,
189190 kv_store,
191+ runtime,
190192 ) )
191193 }
192194}
@@ -196,6 +198,7 @@ fn build_with_store_internal<'a, K: KVStore + Sync + Send + 'static>(
196198 config : Arc < Config > , entropy_source_config : Option < & ' a EntropySourceConfig > ,
197199 chain_data_source_config : Option < & ' a ChainDataSourceConfig > ,
198200 gossip_source_config : Option < & ' a GossipSourceConfig > , kv_store : Arc < K > ,
201+ runtime : Arc < RwLock < Option < tokio:: runtime:: Runtime > > > ,
199202) -> Node < K > {
200203 let ldk_data_dir = format ! ( "{}/ldk" , config. storage_dir_path) ;
201204 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>(
265268 }
266269 } ;
267270
268- let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
269271 let wallet =
270272 Arc :: new ( Wallet :: new ( blockchain, bdk_wallet, Arc :: clone ( & runtime) , Arc :: clone ( & logger) ) ) ;
271273
0 commit comments