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

Simplify chain-head-related function implementations #806

Merged
merged 11 commits into from
Jun 23, 2023

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Jun 23, 2023

cc #605 #798

This PR significantly simplifies the implementations of the various chainHead functions, notably by removing duplicate information and using early returns.

This is now possible thanks to #793.

I'm still not happy with the complexity of the main implementation of chainHead_follow, but this PR is a big enough step that it's worth merging.

@tomaka
Copy link
Contributor Author

tomaka commented Jun 23, 2023

futures_lite::race requires std because they use randomness to determine which future to poll 😮‍💨

@tomaka tomaka added this pull request to the merge queue Jun 23, 2023
Merged via the queue into smol-dot:main with commit 6285908 Jun 23, 2023
@tomaka tomaka deleted the simplify-chain-head-calls-a-bit branch June 23, 2023 12:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant