mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-11-17 15:26:14 +00:00
Don't wait for tx lock confirmed after broadcast
Bob does not care whether tx lock is confirmed. That is alice's problem. This wait was introduced to remedy a bug in status_of_script() which was failing when called on a transaction with no confirmations.
This commit is contained in:
parent
f5e6ba18e0
commit
8675d88727
@ -106,10 +106,6 @@ async fn run_until_internal(
|
|||||||
.context("Failed to sign Bitcoin lock transaction")?;
|
.context("Failed to sign Bitcoin lock transaction")?;
|
||||||
let (..) = bitcoin_wallet.broadcast(signed_tx, "lock").await?;
|
let (..) = bitcoin_wallet.broadcast(signed_tx, "lock").await?;
|
||||||
|
|
||||||
bitcoin_wallet
|
|
||||||
.watch_until_status(&tx_lock, |status| status.is_confirmed())
|
|
||||||
.await?;
|
|
||||||
|
|
||||||
let state = BobState::BtcLocked(state3);
|
let state = BobState::BtcLocked(state3);
|
||||||
let db_state = state.clone().into();
|
let db_state = state.clone().into();
|
||||||
db.insert_latest_state(swap_id, Swap::Bob(db_state)).await?;
|
db.insert_latest_state(swap_id, Swap::Bob(db_state)).await?;
|
||||||
|
Loading…
Reference in New Issue
Block a user