File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -229,18 +229,17 @@ impl Builder {
229229 )
230230 . expect ( "Failed to setup on-chain wallet" ) ;
231231
232- // TODO: Check that we can be sure that the Esplora client re-connects in case of failure
233- // and and exits cleanly on drop. Otherwise we need to handle this/move it to the runtime?
234- let blockchain = EsploraBlockchain :: new ( & config. esplora_server_url , BDK_CLIENT_STOP_GAP )
235- . with_concurrency ( BDK_CLIENT_CONCURRENCY ) ;
236-
237- let wallet = Arc :: new ( Wallet :: new ( blockchain, bdk_wallet, Arc :: clone ( & logger) ) ) ;
238-
239232 let tx_sync = Arc :: new ( EsploraSyncClient :: new (
240233 config. esplora_server_url . clone ( ) ,
241234 Arc :: clone ( & logger) ,
242235 ) ) ;
243236
237+ let blockchain =
238+ EsploraBlockchain :: from_client ( tx_sync. client ( ) . clone ( ) , BDK_CLIENT_STOP_GAP )
239+ . with_concurrency ( BDK_CLIENT_CONCURRENCY ) ;
240+
241+ let wallet = Arc :: new ( Wallet :: new ( blockchain, bdk_wallet, Arc :: clone ( & logger) ) ) ;
242+
244243 // Step 3: Initialize Persist
245244 let persister = Arc :: new ( FilesystemPersister :: new ( ldk_data_dir. clone ( ) ) ) ;
246245
You can’t perform that action at this time.
0 commit comments