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

pool: improve auto-closing subscriptions and add new exit policy #798

Merged
merged 4 commits into from
Mar 5, 2025

Conversation

yukibtc
Copy link
Member

@yukibtc yukibtc commented Mar 5, 2025

  • Use Events::force_insert when fetching events from relays
  • Better handling of auto-closing subscription activity when fetching events
  • Add ReqExitPolicy::WaitForEvents variant

yukibtc added 4 commits March 5, 2025 12:51
Replaced `Events::insert` with `Events::force_insert` to ensure events are not discarded when exceeding filter limits, accommodating policies like `WaitForEventsAfterEOSE`.

Signed-off-by: Yuki Kishimoto <[email protected]>
…hing events

Use a dedicated mpsc channel for sending auto-closing subscription activity to the `Relay::fetch_events_with_callback` method.

Signed-off-by: Yuki Kishimoto <[email protected]>
Allow exiting from a REQ after the subscription received N events.

Signed-off-by: Yuki Kishimoto <[email protected]>
@yukibtc yukibtc added this to the Release v0.40 milestone Mar 5, 2025
@yukibtc yukibtc merged commit 16287ca into master Mar 5, 2025
9 checks passed
@yukibtc yukibtc deleted the wait-for-events branch March 5, 2025 12:36
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