Skip to content
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

Farcasterd connect refactor #711

Merged
merged 4 commits into from
Oct 12, 2022

Conversation

TheCharlatan
Copy link
Member

This is done with the goal of making the processing of make and take offer easier to read by removing most of the and_then statements and unnesting some of the logic.

Coincidentally, this also solves a bug where the peer services are not removed from the spawning_services HashSet and where the connect function might double-spawn a connection that has not said Hello to farcasterd yet.

Lastly, the swap state machine now checks during the transition from SwapdLaunched to SwapdRunning that that the peer connection is up and available before initializing the swap.

@TheCharlatan TheCharlatan force-pushed the farcasterdConnectRefactor branch from bef31f0 to ce0a225 Compare August 31, 2022 14:17
This is done with the goal of making the processing of make and take
offer easier to read by removing most of the and_then statements and
unnesting some of the logic.

Coincidentally, this also solves a bug where the peer services are not
removed from the spawning_services HashSet and where the connect
function might double-spawn a connection that has not said Hello to
farcasterd yet.
The swap state machine now checks during the transition from
SwapdLaunched to SwapdRunning that that the peer connection is up and
available before initializing the swap.
After testing some values, 100ms is still ampple time to wait
@TheCharlatan TheCharlatan force-pushed the farcasterdConnectRefactor branch from 5fbde27 to 1b55c6e Compare September 2, 2022 14:12
@TheCharlatan TheCharlatan marked this pull request as ready for review September 2, 2022 14:13
@h4sh3d h4sh3d added the farcaster.dev testing Currently apply (or to be applied) on farcaster.dev backend label Oct 5, 2022
Copy link
Member

@h4sh3d h4sh3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tACK

Over the last week I've encounter only 1 disconnect, on Monday this week, my client took 3 attempts and reconnected successfully to then complete the swap.

EDIT: what I mean by the message below is: never encountered a connection issue with this refactor, all my swaps waited correctly and started after the connection was instantiated

@h4sh3d h4sh3d merged commit b2ea063 into farcaster-project:main Oct 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
farcaster.dev testing Currently apply (or to be applied) on farcaster.dev backend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants