-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify swap and recovery execution #41
Conversation
c27b00d
to
4a28051
Compare
Consolidate and simplify swap execution. Generators are no longer needed. Consolidate recovery and swap data structures. The recursive calls can be replaced with a loop if returning prior to completion is desired for testing purposes. Fill out alice abort path Move state machine executors into seperate files Not compiling due to recursion/async issues Fix async recursion compilation errors Fix Bob swap execution Remove check for ack message from Alice. Seems like a bad idea to rely on an acknowledgement message instead of looking at the blockchain. Fix Bob abort Fix warnings Xmr lock complete Add TxCancel submit to XmrLocked Bob swap completed Remove alice
Tealised that the whole point is for them to be idempotent to be useful
2043f36
to
f54075e
Compare
Save state0 in the swarm to process message0
Poll bob swarm to send encsig after calling send message3. Comment out unimplmented wait for transaction finality trait. Dial alice.
} | ||
} | ||
|
||
// // State machine driver for recovery execution |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove this?
swap/src/bin/simple_swap.rs
Outdated
} | ||
|
||
// State machine driver for recovery execution | ||
pub async fn recover(state: AliceState, io: Io) -> Result<AliceState> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So recover
actually mean refund
, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's get it in, totally fine to address the cleanup comments in follow ups :)
Consolidate and simplify swap execution. Generators are no longer
needed. Consolidate recovery and swap data structures. The
recursive calls can be replaced with a loop if returning prior to
completion is desired for testing purposes.