Skip to content

sdk(local_relay): refactor filter limits - #1461

Open
yukibtc wants to merge 1 commit into
masterfrom
sdk-req-limits
Open

sdk(local_relay): refactor filter limits#1461
yukibtc wants to merge 1 commit into
masterfrom
sdk-req-limits

Conversation

@yukibtc

@yukibtc yukibtc commented Aug 22, 2026

Copy link
Copy Markdown
Member

Description

Refactor filter limit configuration and checks. Use max_filter_limit as the limit for each filter. The combination of max_filter_limit and max_filters_per_req determines the maximum number of query results per request.

Deprecate LocalRelayBuilder::max_query_results and LocalRelayBuilder::default_filter_limit in favor of LocalRelayBuilder::max_filters_per_req and LocalRelayBuilder::max_filter_limit, respectively.

Replaces #1457

Checklist

  • I followed the contribution guidelines
  • I updated the relevant CHANGELOG.md (if applicable)
  • I understand and can explain all code in this PR

@yukibtc
yukibtc requested a review from TheAwiteb as a code owner August 22, 2026 07:49
yukibtc added a commit that referenced this pull request Aug 22, 2026
Refactor filter limit configuration and checks. Use `max_filter_limit` as the limit for each filter. The combination of `max_filter_limit` and `max_filters_per_req` determines the maximum number of query results per request.

Deprecate `LocalRelayBuilder::max_query_results` and `LocalRelayBuilder::default_filter_limit` in favor of `LocalRelayBuilder::max_filters_per_req` and `LocalRelayBuilder::max_filter_limit`, respectively.

Replaces #1457

Pull-Request: #1461
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
Refactor filter limit configuration and checks. Use `max_filter_limit` as the limit for each filter. The combination of `max_filter_limit` and `max_filters_per_req` determines the maximum number of query results per request.

Deprecate `LocalRelayBuilder::max_query_results` and `LocalRelayBuilder::default_filter_limit` in favor of `LocalRelayBuilder::max_filters_per_req` and `LocalRelayBuilder::max_filter_limit`, respectively.

Replaces #1457

Pull-Request: #1461
Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
@codecov

codecov Bot commented Aug 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.77419% with 4 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
nostr-sdk/src/local_relay/builder.rs 62.50% 3 Missing ⚠️
nostr-sdk/src/local_relay/local/inner.rs 96.42% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@TheAwiteb TheAwiteb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

ACK

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.

2 participants