118: Add minimum monero confirmations to config use it for Bob r=da-kami a=da-kami
After discussion with @bonomat about enforced `10` confirmations until a tx is spendable on Monero I gave it a try with only `1` confirmation on regtest happy-path-test and `5` for `stagenet` and did not encounter problems. Both swaps passed without problems so I am proposing to merge these changes.
One additional change crept in: Changed the average blocktime for `stagenet` to `4` mins, because the blocktime fluctuates a lot. See: https://monero-stagenet.exan.tech/
Co-authored-by: Daniel Karzel <daniel@comit.network>
115: Monero wallet network, Testnet r=da-kami a=da-kami
Add network for monero and switch application to run on Bitcoin `testnet3` and Monero `stagenet`.
Co-authored-by: Daniel Karzel <daniel@comit.network>
We have overridden a number of clippy warnings such as
"large enum variant".
Considering that we have a number of issues
with the stack size in CI, it is more prudent to follow clippy's advice
and box larger items so that the enum does not take larger space.
Do note that an instance of the enum always takes as much space as its
largest variant.
112: Align database types with swap states r=D4nte a=D4nte
- Removing naming ambiguities and errors
- Clean up the DB state now that they are only use in the new recursive function.
- Remove few todos and panics.
Co-authored-by: Franck Royer <franck@coblox.tech>
There are no refund timelock, only a cancellation timelock and punish
timelock.
Refund can be done as soon as the cancellation transaction is published.
107: Ensure that Bob can cancel correctly if T1 expired and Alice did not … r=da-kami a=da-kami
Bob has to check for the possibility to cancel in every state after he locked the BTC.
Otherwise Bob will try to perform actions that don't have any point and it might be impossible to use the `resume` command because it will always fail in trying to go on with Alice even though that might not be possible.
Co-authored-by: Daniel Karzel <daniel@comit.network>
108: Remove all CLI short-codes because they don't add value at the moment r=da-kami a=da-kami
`struct_opt` does not check at compile time, if there is a duplicate. Only when running the application. We have been running in this annoyance twice, so let's remove the shortcodes for now.
Co-authored-by: Daniel Karzel <daniel@comit.network>
Bob has to check for the possibility to cancel in every state after he locked the BTC.
Otherwise Bob will try to perform actions that don't have any point.