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

Fix NonExistentPoolMap #2853

Merged
merged 3 commits into from
Aug 2, 2024
Merged

Fix NonExistentPoolMap #2853

merged 3 commits into from
Aug 2, 2024

Conversation

fleupold
Copy link
Contributor

@fleupold fleupold commented Aug 1, 2024

Description

We have been using HashSetDelay incorrectly. The expiration time is only respected if the set is turned into a stream and awaited on (it will return Err for expired items).

This interface is very clunky and doesn't really serve our use case.

Changes

  • Replace HashSetDelay with TtlCache which has a much more intuitive interface

How to test

Existing tests pass. Also, in the next PR I will add an e2e test that actually relies on the non-existent pool cache to be reset (as liquidity appears throughout the lifetime of the test)

@fleupold fleupold requested a review from a team as a code owner August 1, 2024 22:34
Copy link
Contributor

@squadgazzz squadgazzz left a comment

Choose a reason for hiding this comment

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

LG

@fleupold fleupold enabled auto-merge (squash) August 2, 2024 10:31
@fleupold fleupold merged commit cd2af46 into main Aug 2, 2024
10 checks passed
@fleupold fleupold deleted the fix_non_existing_pool_datastructure branch August 2, 2024 10:37
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants