mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-10-01 01:45:40 -04:00
feat: Retry by abusing state machine
This commit is contained in:
parent
c80bdb2d8c
commit
c68e282a4f
@ -119,12 +119,22 @@ where
|
|||||||
|
|
||||||
let transfer_proof = monero_wallet
|
let transfer_proof = monero_wallet
|
||||||
.transfer(state3.lock_xmr_transfer_request())
|
.transfer(state3.lock_xmr_transfer_request())
|
||||||
.await?;
|
.await;
|
||||||
|
|
||||||
AliceState::XmrLockTransactionSent {
|
match transfer_proof {
|
||||||
monero_wallet_restore_blockheight,
|
Ok(transfer_proof) => {
|
||||||
transfer_proof,
|
AliceState::XmrLockTransactionSent {
|
||||||
state3,
|
monero_wallet_restore_blockheight,
|
||||||
|
transfer_proof,
|
||||||
|
state3,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Err(e) => {
|
||||||
|
tracing::error!("Failed to lock XMR: {:#}", e);
|
||||||
|
// Sleep 10seconds
|
||||||
|
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
|
||||||
|
AliceState::BtcLocked { state3 }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ => AliceState::SafelyAborted,
|
_ => AliceState::SafelyAborted,
|
||||||
|
Loading…
Reference in New Issue
Block a user