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 bug in host scanning #143

Merged
merged 12 commits into from
Nov 26, 2024
Merged

Fix bug in host scanning #143

merged 12 commits into from
Nov 26, 2024

Conversation

chris124567
Copy link
Member

@chris124567 chris124567 commented Nov 21, 2024

  • Fix bug where the last_announcement column would not be updated after it was initially set. Because we only scan hosts where last_announcement is from the past 90 days, this meant that only new hosts announced in the past 3 months would be returned by HostsForScanning and thus scanned. This caused us to miss hosts that were announced for the first time more than 90 days ago but were still active. Add checks to TestScan to catch this in the future.
  • Change addHosts to not overwrite the host settings we got from a previous successful scan in the event of a failed scan. Add check to TestScan to ensure this does not happen.

@chris124567 chris124567 marked this pull request as ready for review November 21, 2024 19:01
Base automatically changed from v2 to master November 21, 2024 19:15
… in a transaction and then mining a block with that txn) rather than through unexported addHosts method, simplify query used in addHosts because we only need to update lastAnnouncement and the net addresses for that host, use a separate query for unsuccessful scans and successful scans in addHostScans
explorer/types.go Outdated Show resolved Hide resolved
persist/sqlite/consensus.go Outdated Show resolved Hide resolved
persist/sqlite/consensus.go Outdated Show resolved Hide resolved
@chris124567
Copy link
Member Author

OK I think this can be merged

@n8maninger n8maninger merged commit 206cccb into master Nov 26, 2024
8 checks passed
@n8maninger n8maninger deleted the fix-last-announcement-update branch November 26, 2024 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

4 participants