Commit graph

25 commits

Author SHA1 Message Date
binarybaron
86ac0579f0 Sync bitcoin wallet before initial max_giveable call 2023-08-28 11:08:05 +02:00
binarybaron
1ec16c6bc1 Add tracing span attribute log_reference_id to logs caused by rpc call 2023-08-28 11:08:05 +02:00
binarybaron
bbcfffab6d WIP: Struct for concurrent swaps manager 2023-08-16 17:59:44 +02:00
binarybaron
ec65ea2b27 Merge branch 'rpc-server' of https://github.com/yamabiiko/xmr-btc-swap into rpc-server 2023-08-14 16:54:14 +02:00
binarybaron
5ca2a9ab5a Replace get_swap_start_date, get_seller, get_expired_timelock with one get_swap_info rpc method 2023-08-14 16:49:14 +02:00
Lorenzo Tucci
969c58e987 initiating swaps in a separate task and handling shutdown signals with broadcast queues 2023-08-14 11:31:54 +02:00
Lorenzo Tucci
6a9f72a857 initiating swaps in a separate task and handling shutdown signals with broadcast queues 2023-08-14 11:21:04 +02:00
binarybaron
1b13608d96 Add get_swap_expired_timelock timelock, other small refactoring
- Add get_swap_expired_timelock endpoint to return expired timelock if one exists. Fails if bitcoin lock tx has not yet published or if swap is already finished.
- Rename current_epoch to expired_timelock to enforce consistent method names
- Add blocks left until current expired timelock expires (next timelock expires) to ExpiredTimelock struct
- Change .expect() to .unwrap() in rpc server method register because those will only fail if we register the same method twice which will never happen
2023-08-12 23:26:08 +02:00
binarybaron
ffbbe24010 Use RwLock instead of Mutex to allow for parallel reads and add get_current_swap endpoint 2023-08-11 15:29:59 +02:00
binarybaron
7d2b7bee92 Combine Cmd and Params 2023-08-11 10:50:13 +02:00
binarybaron
63c1edbdd3 Add cancel_refund RPC endpoint 2023-08-10 15:17:35 +02:00
binarybaron
7193866c30 dprint fmt 2023-08-10 00:15:16 +02:00
binarybaron
186b242db5 Add called api method and swap_id to tracing for context, reduced boilerplate 2023-08-09 22:30:41 +02:00
Lorenzo Tucci
9d1a39b2ff
fixing formatting and cargo clippy warnings 2023-01-11 14:52:42 +01:00
Lorenzo Tucci
b5396798e4
fixing warnings 2023-01-11 13:07:11 +01:00
Lorenzo Tucci
88aee1966d
adding new unfinished RPC tests 2022-12-14 17:17:43 +01:00
Lorenzo Tucci
cf5efa8ad0
add broadcast channel to handle shutdowns gracefully and prepare for RPC server test 2022-12-09 22:33:52 +01:00
Lorenzo Tucci
aeeffccda2
moving methods to api and validating addresses for rpc 2022-12-05 20:11:58 +01:00
Lorenzo Tucci
a26822d85b
split api module and propagate errors with rpc server 2022-12-05 19:26:47 +01:00
binarybaron
e1983d5639 Cleanup, formatting, add get_seller, get_swap_start_date RPC endpoints 2022-12-02 21:46:27 +01:00
Lorenzo Tucci
f4f6ec4239 cleaning up, renamed Init to Context 2022-11-30 16:35:39 +01:00
Lorenzo Tucci
f26b27c266 writing async rpc methods and using arc for shared struct references 2022-11-30 16:35:39 +01:00
Lorenzo Tucci
da3307d4d6 updating wip 2022-11-30 16:35:39 +01:00
Lorenzo Tucci
22deb6b47e saving to wip 2022-11-30 16:35:39 +01:00
Lorenzo Tucci
87e5dd8b53 saving to wip 2022-11-30 16:35:39 +01:00