Commit Graph

118 Commits (5a3675a06fcafe2dcc2ab9ff2c0096423362431c)

Author SHA1 Message Date
Franck Royer 297b15e3ce
Remove async block when it is not needed 3 years ago
Franck Royer 1fa812b727
Separate Buy/Sell for resume command
To avoid confusing the user on whether person should enter a listen addr
or a connect peer id and address
3 years ago
Franck Royer 49b84d84b9
Add address at the start
Do not carry peer id around as we currently only expect one peer.
3 years ago
Franck Royer 1a4bd0e2b4
Bob refunds swap after restart that requires communication
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.
3 years ago
Daniel Karzel e9681b6e2b Work in review comments 4 years ago
Daniel Karzel 6d03d1bbff Resume command and global database cl-parameter 4 years ago
Franck Royer 5ba830f3bf
Replace swap `recover` terminology with `resume` 4 years ago
rishflab 143d8bc07d
Move message0 response handler out of NB 4 years ago
rishflab 4b00141c29
Fix happy path test 4 years ago
Franck Royer 4ce8695dfc
Align with origin/database 4 years ago
Franck Royer 64b021daf4
Save Alice states in db 4 years ago
Franck Royer 11cea9ba69
Remove passing alice peer id
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.
4 years ago
Daniel Karzel 03b8e5f52e Upgrade CLI for mainnet test 4 years ago
Franck Royer ef6e8fc723
Clean-up unused code 4 years ago
rishflab 27d1334726 Init Alice behaviour with state0
Previously state0 had to be set after creating Alice's behaviour.
With the event loop we no longer has access to the swarm so
set_state0() has to be called indirectly through a channel. This
means it is difficult to guarantee state0 is being set due to the
asynchronous nature of channels. This was solved by initialising
Alice with state0.
4 years ago
rishflab 24631d464d Add test for recursive executor 4 years ago
Franck Royer c4cd64d134 Implemented Alice transition from `Started` to `Negotiated` 4 years ago
rishflab dd07e2f882 Add Alice execution path
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
4 years ago