swap_setup instead of spot_price and execution_setup

Having `spot_price` and `execution_setup` as separate protocols did not bring any advantages, but was problematic because we had to ensure that `execution_setup` would be triggered after `spot_price`. Because of this dependency it is better to combine the protocols into one.

Combining the protocols also allows a refactoring to get rid of the `libp2p-async-await` dependency.

Alice always listens for the `swap_setup` protocol. When Bob opens a substream on that protocol the spot price is communicated, and then all execution setup messages (swap-id and signature exchange).
This commit is contained in:
Daniel Karzel 2021-06-24 13:54:26 +10:00
parent ada5acb2b5
commit 818147a629
No known key found for this signature in database
GPG key ID: 30C3FC2E438ADB6E
30 changed files with 1063 additions and 1563 deletions

View file

@ -344,8 +344,7 @@ mod tests {
tx_redeem_fee,
tx_punish_fee,
&mut OsRng,
)
.unwrap();
);
let bob_state0 = bob::State0::new(
Uuid::new_v4(),