citadel-tech / coinswap

Functioning, minimal-viable binaries and libraries to perform a trustless, p2p Maxwell-Belcher Coinswap Protocol
https://gist.github.com/chris-belcher/9144bd57a91c194e332fb5ca371d0964
Other
73 stars 46 forks source link

Bye bye tokio #224

Closed mojoX911 closed 2 months ago

mojoX911 commented 3 months ago

Fixes #185 #214

Summary

This PR attempts to remove tokio from the whole crate and makes all code blocking. This simplifies the code structure and makes the internal thread pool management more visible.

Tokio has been a historical dependency of the crate, and provided little benefit, as the Maker server maxes out at 5 fixed and one thread per swap peer. So tokio was an over-engineering.

Benefits of these changes:

There's a lot changed here (almost everything). So take your time reviewing.

Suggestion for Reveiwers.

mojoX911 commented 2 months ago

@Shourya742 Added the following changes:

If this looks good will squash the commits.