@@ -163,12 +163,14 @@ impl Builder {
163
163
let entropy_source_config = self . entropy_source_config . read ( ) . unwrap ( ) ;
164
164
let chain_data_source_config = self . chain_data_source_config . read ( ) . unwrap ( ) ;
165
165
let gossip_source_config = self . gossip_source_config . read ( ) . unwrap ( ) ;
166
+ let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
166
167
Arc :: new ( build_with_store_internal (
167
168
config,
168
169
entropy_source_config. as_ref ( ) ,
169
170
chain_data_source_config. as_ref ( ) ,
170
171
gossip_source_config. as_ref ( ) ,
171
172
kv_store,
173
+ runtime,
172
174
) )
173
175
}
174
176
}
@@ -178,6 +180,7 @@ fn build_with_store_internal<'a, K: KVStore + Sync + Send + 'static>(
178
180
config : Arc < Config > , entropy_source_config : Option < & ' a EntropySourceConfig > ,
179
181
chain_data_source_config : Option < & ' a ChainDataSourceConfig > ,
180
182
gossip_source_config : Option < & ' a GossipSourceConfig > , kv_store : Arc < K > ,
183
+ runtime : Arc < RwLock < Option < tokio:: runtime:: Runtime > > > ,
181
184
) -> Node < K > {
182
185
let ldk_data_dir = format ! ( "{}/ldk" , config. storage_dir_path) ;
183
186
fs:: create_dir_all ( ldk_data_dir. clone ( ) ) . expect ( "Failed to create LDK data directory" ) ;
@@ -247,7 +250,6 @@ fn build_with_store_internal<'a, K: KVStore + Sync + Send + 'static>(
247
250
}
248
251
} ;
249
252
250
- let runtime = Arc :: new ( RwLock :: new ( None ) ) ;
251
253
let wallet =
252
254
Arc :: new ( Wallet :: new ( blockchain, bdk_wallet, Arc :: clone ( & runtime) , Arc :: clone ( & logger) ) ) ;
253
255
0 commit comments