There are no refund timelock, only a cancellation timelock and punish
timelock.
Refund can be done as soon as the cancellation transaction is published.
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.
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.
The usage of the peer id is incorrect as we do not even check it when
dialing. For now, we can ignore it.
We can then re-introduce it and use it properly at a later stage.
Reworked Alice XmrLocked state transition handler to handle the
scenario when Alice received the encsig but Bob refunds.
Previously Alice was trying to redeem after receiving the encsig
without checking if t1 had elapsed.
Previously the libp2p swarm had to be manually polled within the
protocol execution code to execute actions such as sending a
message. The swarm is now wrapped in SwarmDriver which polls the
swarm in a seperate task
Use reusable test init functions for happy path test
Extract tracing setup to reusable function
Move test initialization to seperate functions
Increase stack size in CI
Fix monero max finality time
Force Bob swarm polling to send message 2
Run Bob state to xmr_locked in punish test to force the sending of
message2. Previously Bob state was run until btc_locked. Although
this was the right thing to do, message2 was not being sent as the
swarm was not polled in btc_locked. Alice punish test passes.
Add info logging to executor