Commit Graph

16 Commits

Author SHA1 Message Date
Daniel Karzel
8615aaed6e Make lock-tx id available in redeem/punish state to be able to assert exact fees 2021-01-18 14:45:47 +11:00
Daniel Karzel
55024572ae Refactor punish test and punish assertions 2021-01-18 14:10:16 +11:00
Daniel Karzel
664958939d Create network::Seed from swap::Seed instead of abstracting over byte array 2021-01-11 12:03:29 +11:00
Daniel Karzel
0a21040e08 Deterministic peer id from seed for alice
This includes the introduction of the --data-dir parameter instead of the --database.
Both the seed file and the database are stored in the data-dir, the database in sub-folder `database`.
2021-01-11 12:00:48 +11:00
rishflab
dcea54dbf1 Move protocol parent states into appropriate module 2021-01-08 12:34:36 +11:00
rishflab
c900d12593 Merge xmr_btc crate
Created network, storage and protocol modules. Organised
files into the modules where the belong.

xmr_btc crate moved into isolated modulein swap crate.

Remove the xmr_btc module and integrate into swap crate.

Consolidate message related code

Reorganise imports

Remove unused parent Message enum

Remove unused parent State enum

Remove unused dependencies from Cargo.toml
2021-01-08 12:34:33 +11:00
Daniel Karzel
487b880371 Cleanup unused config param that was accidentally introduced 2021-01-07 12:23:29 +11:00
Daniel Karzel
e031681369 Add minimum monero confirmations to config use it for Bob 2021-01-06 17:17:37 +11:00
Franck Royer
a31db63e54
Improve state names and display 2020-12-23 14:12:29 +11:00
Franck Royer
e366d3a73b
Join all futures to avoid hanging tests 2020-12-21 12:17:40 +11:00
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.
2020-12-21 08:31:21 +11:00
Franck Royer
638143a10d
Replace hard coded port by dynamic available one
Fixes #84.
2020-12-21 08:19:31 +11:00
Daniel Karzel
7cae6a9e4d
Add Bob restart test 2020-12-15 11:43:28 +11:00
Daniel Karzel
91d4d5da25
Cleanup swap execution to not return EventLoopHandle, refactor both_refund test 2020-12-15 11:43:28 +11:00
Daniel Karzel
8c929564ef
Refactor container initialization 2020-12-15 11:43:27 +11:00
Daniel Karzel
4143394767
Add recovery function for Alice 2020-12-15 11:40:40 +11:00