@@ -235,7 +235,8 @@ fn create_third_party(uuid: Uuid, bitcoind: &Bitcoind) -> Arc<Node> {
235235
236236async fn fund_node ( node : & Node , bitcoind : & Bitcoind , electrsd : & ElectrsD ) {
237237 let addr = node. onchain_payment ( ) . new_address ( ) . unwrap ( ) ;
238- bitcoind. client . send_to_address ( & addr, bitcoin:: Amount :: from_btc ( 1.0 ) . unwrap ( ) ) . unwrap ( ) ;
238+ let res = bitcoind. client . send_to_address ( & addr, bitcoin:: Amount :: from_btc ( 1.0 ) . unwrap ( ) ) . unwrap ( ) ;
239+ wait_for_tx ( & electrsd. client , res. txid ( ) . unwrap ( ) ) . await ;
239240 generate_blocks ( bitcoind, electrsd, 6 ) . await ;
240241}
241242
@@ -333,7 +334,7 @@ async fn build_test_nodes() -> TestParams {
333334
334335 // take esplora url and just get the port, as we know it's running on localhost
335336 let base_url = electrsd. esplora_url . as_ref ( ) . unwrap ( ) ;
336- let port = base_url. split ( ':' ) . last ( ) . unwrap ( ) ;
337+ let port = base_url. split ( ':' ) . next_back ( ) . unwrap ( ) ;
337338 let esplora_url = format ! ( "http://localhost:{port}" ) ;
338339
339340 let wallet_config = WalletConfig {
@@ -468,7 +469,11 @@ async fn build_test_nodes() -> TestParams {
468469 mint
469470 } ;
470471
471- let esplora_url = format ! ( "http://{}" , electrsd. esplora_url. as_ref( ) . unwrap( ) ) ;
472+ // take esplora url and just get the port, as we know it's running on localhost
473+ let base_url = electrsd. esplora_url . as_ref ( ) . unwrap ( ) ;
474+ let port = base_url. split ( ':' ) . next_back ( ) . unwrap ( ) ;
475+ let esplora_url = format ! ( "http://localhost:{port}" ) ;
476+
472477 let tmp = temp_dir ( ) . join ( format ! ( "orange-test-{test_id}/wallet" ) ) ;
473478 let wallet_config = WalletConfig {
474479 storage_config : StorageConfig :: LocalSQLite ( tmp. to_str ( ) . unwrap ( ) . to_string ( ) ) ,
0 commit comments