mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-12-18 04:14:32 -05:00
Add edge case bugfix for our databse not updating correctly when Alice redeems her BTC
This commit is contained in:
parent
1930540c1f
commit
65a9c1680e
@ -190,6 +190,11 @@ async fn next_state(
|
|||||||
// Bob sends Alice his key
|
// Bob sends Alice his key
|
||||||
|
|
||||||
select! {
|
select! {
|
||||||
|
state5 = state.watch_for_redeem_btc(bitcoin_wallet) => {
|
||||||
|
// there seems to be a weird edge case where you can send the encrypted signature, alice can redeem the btc, but your database doesn't update to encsigsent or btcredeemed, so here we will watch for redemption too, so we have a chance to unlock xmr.
|
||||||
|
// this seemed to have happened when a surge of blocks came in on stagenet within a short time frame
|
||||||
|
BobState::BtcRedeemed(state5?)
|
||||||
|
},
|
||||||
result = event_loop_handle.send_encrypted_signature(state.tx_redeem_encsig()) => {
|
result = event_loop_handle.send_encrypted_signature(state.tx_redeem_encsig()) => {
|
||||||
match result {
|
match result {
|
||||||
Ok(_) => BobState::EncSigSent(state),
|
Ok(_) => BobState::EncSigSent(state),
|
||||||
|
Loading…
Reference in New Issue
Block a user