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: check eviction filter for new providers #542

Merged
merged 1 commit into from
May 20, 2024

Conversation

achingbrain
Copy link
Member

When new providers are found, check the eviction filter in isEvicted rather than the current list of providers.

Fixes #501

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation if necessary (this includes comments as well)
  • I have added tests that prove my fix is effective or that my feature works

@achingbrain achingbrain requested a review from a team as a code owner May 20, 2024 10:27
@achingbrain achingbrain force-pushed the fix/check-eviction-filter-for-provider branch 2 times, most recently from 9bca946 to 2ed0bae Compare May 20, 2024 10:29
When new providers are found, check the eviction filter in `isEvicted`
rather than the current list of providers.

Fixes #501
@achingbrain achingbrain force-pushed the fix/check-eviction-filter-for-provider branch from 2ed0bae to fa10e7c Compare May 20, 2024 10:30
@@ -188,7 +188,7 @@ export abstract class AbstractSession<Provider, RetrieveBlockProgressEvents exte
}

isEvicted (provider: Provider): boolean {
return this.providers.some(prov => this.equals(prov, provider))
return this.evictionFilter.has(this.toEvictionKey(provider))
Copy link
Member

Choose a reason for hiding this comment

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

bah.. how did I miss that

@achingbrain achingbrain merged commit f46700f into main May 20, 2024
18 checks passed
@achingbrain achingbrain deleted the fix/check-eviction-filter-for-provider branch May 20, 2024 15:41
@achingbrain achingbrain mentioned this pull request May 16, 2024
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.

bug: endless session routing
2 participants