From dc088c8cb22454a9c1171ae87d31685abc6f88e9 Mon Sep 17 00:00:00 2001 From: Carlos Alejandro Gutierrez Sandoval Date: Fri, 27 Oct 2023 09:50:20 -0600 Subject: [PATCH] reintegrate delegated logic --- romeo/src/bitcoin_client.rs | 3 --- romeo/src/system.rs | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/romeo/src/bitcoin_client.rs b/romeo/src/bitcoin_client.rs index ce4e2ca7..8259ee59 100644 --- a/romeo/src/bitcoin_client.rs +++ b/romeo/src/bitcoin_client.rs @@ -210,8 +210,6 @@ where &self, outputs: Vec<(Script, u64)>, ) -> anyhow::Result { - sleep(Duration::from_secs(3)).await; - let blockchain = self.blockchain.clone(); let wallet = self.wallet.clone(); @@ -309,7 +307,6 @@ mod tests { let client_sbtc_wallet = client .wallet - .clone() .lock() .unwrap() .get_address(bdk::wallet::AddressIndex::Peek(0)) diff --git a/romeo/src/system.rs b/romeo/src/system.rs index 8a2d182b..30dc9c3b 100644 --- a/romeo/src/system.rs +++ b/romeo/src/system.rs @@ -1,6 +1,6 @@ //! System -use std::{fs::create_dir_all, io::Cursor}; +use std::{fs::create_dir_all, io::Cursor, time::Duration}; use bdk::{ bitcoin::Txid as BitcoinTxId, @@ -440,6 +440,7 @@ async fn fulfill_asset( ) .expect("Could not create withdrawal fulfillment outputs"); + tokio::time::sleep(Duration::from_secs(3)).await; let txid = bitcoin_client .sign_and_broadcast(outputs.to_vec()) .await