xmr-btc-swap/swap
Daniel Karzel 62079fc342 Punish scenario falls back to refund or fails
If we enter a punish scenario we can be sure the punish timelock is expired.
Thus, we must be able to punish unless Bob published the refund transaction.
There is no benefit in racing punish against refund here, because we cannot recover from a punish tx failure anyway.

The logic was changed to:
Try to broadcast punish tx and await finality.
  If either punish broadcasting of finality fails, try to fetch the refund transaction.
    If it is available extract Bob's Monero key part and transition to refund.
    If refund tx is not available fail without a status update.

Note that we do not distinguish different errors upon failure of punish, because
we cannot recover anyway. If we fail to retrieve Bob's refund tx, we just exit without
a status update so punish can be retried by resuming the swap.
2021-03-22 16:10:01 +11:00
..
src Punish scenario falls back to refund or fails 2021-03-22 16:10:01 +11:00
tests Alice sweeps refunded funds into default wallet 2021-03-18 17:59:48 +11:00
Cargo.toml prepare 0.3 release 2021-03-18 11:11:20 +11:00