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

Use schnellru crate instead of lru in massa-protocol-worker #3974

Merged
merged 4 commits into from
May 25, 2023

Conversation

litchipi
Copy link
Contributor

Closes #3844

Uses schnellru version 0.2.1 for the Lru cache in protocol worker.
Some hacks were required to make it work as it doesn't have any contains, iter_mut and promote functions.
Also, some other functions have different behavior (get returns a &mut to have a immutable we have to use peek)

@litchipi litchipi requested a review from AurelienFT May 23, 2023 15:29
@litchipi litchipi changed the base branch from main to testnet_23 May 23, 2023 15:29
@litchipi
Copy link
Contributor Author

As Aurelien mentioned you in #3844, @Eitu33 what do you think about these changes ? I don't really know the schnellru crate

Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
Signed-off-by: Litchi Pi <litchi.pi@proton.me>
@litchipi
Copy link
Contributor Author

@AurelienFT Ready for a new review

Signed-off-by: Litchi Pi <litchi.pi@proton.me>
@AurelienFT
Copy link
Member

Nice refactor ! Thank you

@litchipi litchipi merged commit 1b35c2e into testnet_23 May 25, 2023
10 checks passed
@AurelienFT AurelienFT deleted the use_schnellru branch May 29, 2023 09:42
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.

Change lru crate in network
2 participants