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 {
229
229
)
230
230
. expect ( "Failed to setup on-chain wallet" ) ;
231
231
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
-
239
232
let tx_sync = Arc :: new ( EsploraSyncClient :: new (
240
233
config. esplora_server_url . clone ( ) ,
241
234
Arc :: clone ( & logger) ,
242
235
) ) ;
243
236
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
+
244
243
// Step 3: Initialize Persist
245
244
let persister = Arc :: new ( FilesystemPersister :: new ( ldk_data_dir. clone ( ) ) ) ;
246
245
You can’t perform that action at this time.
0 commit comments