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

fixed issue where relay metadata is never updated #1472 #1473

Merged
merged 1 commit into from
Sep 9, 2024
Merged

Conversation

bryanmontz
Copy link
Contributor

Issues covered

#1472

Description

Faulty date logic prevented relay metadata from ever being updated after the initial time. The check in RelayService.queryRelayMetadataIfNeeded(_:) was backwards and resulted in a negative number for the time interval, failing the check every time.

How to test

The issue and the fix are not readily observable from the UI. However, a developer can add log statements to confirm the issue and the fix for it.

Before (from the ticket):
The breakpoint is never hit, even though some of the relays' metadata is two weeks old.
Nos_—_RelayService_swift

After:
The breakpoint is hit (and metadata will be updated) when the code encounters the first relay whose metadata is over 3 days old:
Nos_—_RelayService_swift

Copy link
Contributor

@joshuatbrown joshuatbrown left a comment

Choose a reason for hiding this comment

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

Excellent work finding and fixing this! Thank you!

@joshuatbrown joshuatbrown added this pull request to the merge queue Sep 9, 2024
Merged via the queue into main with commit 90de311 Sep 9, 2024
4 checks passed
@joshuatbrown joshuatbrown deleted the bdm/1472 branch September 9, 2024 21:09
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