mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-11-29 12:06:35 -05:00
Test on-chain protocol happy path
This commit is contained in:
parent
d3a7689059
commit
5395303a99
9 changed files with 457 additions and 245 deletions
|
|
@ -50,13 +50,15 @@ pub async fn next_state<
|
|||
|
||||
let message1 = transport.receive_message().await?.try_into()?;
|
||||
let state2 = state1.receive(message1)?;
|
||||
|
||||
let message2 = state2.next_message();
|
||||
transport.send_message(message2.into()).await?;
|
||||
Ok(state2.into())
|
||||
}
|
||||
State::State2(state2) => {
|
||||
let message2 = state2.next_message();
|
||||
let state3 = state2.lock_btc(bitcoin_wallet).await?;
|
||||
tracing::info!("bob has locked btc");
|
||||
transport.send_message(message2.into()).await?;
|
||||
|
||||
Ok(state3.into())
|
||||
}
|
||||
State::State3(state3) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue