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.
As Bob is dialing Alice, we now ensure that we are connected to Alice
at each step that needs communication.
If we are not connected, we proceed with dialing.
In an attempt to improve libp2p usage, we also add known address of
Alice first and only use peer_id to dial.
This ensures that we use the expected peer id.
Default is 8MB. As we start both Alice and bob in test, it is fine to
double the stack size but still assume it does not impact the
normal execution of the binary.
98: Remove tor module r=da-kami a=da-kami
This removes the currently unused `tor module`.
Different `tokio` versions have been causing issues with the `tor` module in the past (i.e. `Cargo.lock` broken problem...). It started causing issues again when adding a dependency to `jsonrpc_client` working on https://github.com/comit-network/xmr-btc-swap/pull/97
We don't support `tor` at the moment and are no planning to add this feature initially as it is not super important to users.
The functionality can easily added again at a later point.
Co-authored-by: Daniel Karzel <daniel@comit.network>
85: Database & Swap Resume r=da-kami a=D4nte
- Introduce Database for Alice and Bob
- Save states in database
- Resume from database (broken for Bob, will create test + fix it in follow-up) PR
- Tests when alice restarts: Both happy and refund path
Co-authored-by: Franck Royer <franck@coblox.tech>
Co-authored-by: rishflab <rishflab@hotmail.com>
Co-authored-by: Daniel Karzel <daniel@comit.network>
This module was intended to contain helper functions for each step.
However, those are not needed except for the negotiate step.
A dedicated module is not needed for one function.