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: Don't add deleted fnames to sync trie #1617

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

sanjayprabhu
Copy link
Contributor

@sanjayprabhu sanjayprabhu commented Jan 11, 2024

Motivation

We were adding deleted fnames to the trie which cases sync loops since they don't actually exist in the db. Check if fid is 0 and skip adding the deletes.

Change Summary

Describe the changes being made in 1-2 concise sentences.

Merge Checklist

Choose all relevant options below by adding an x now or at any time before submitting for review

Additional Context

If this is a relatively large or complex change, provide more details here that will help reviewers


PR-Codex overview

Focus of the PR:

Fixing an issue where deleted fnames were being added to the sync trie.

Detailed summary:

  • Modified syncEngine.ts to check if the fid of the usernameProof is not 0 before adding it to the sync trie.
  • Added a test in syncEngine.test.ts to verify that a deleted fname is not added to the trie.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@sanjayprabhu sanjayprabhu added the t-bug A fix for a bug with the current system label Jan 11, 2024
Copy link

vercel bot commented Jan 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hub-monorepo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 11, 2024 0:56am

Copy link

changeset-bot bot commented Jan 11, 2024

🦋 Changeset detected

Latest commit: 79bb27b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@farcaster/hubble Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@sanjayprabhu sanjayprabhu merged commit 11a1e0d into farcasterxyz:main Jan 11, 2024
8 checks passed
@sanjayprabhu sanjayprabhu deleted the fix_fname_trie branch January 11, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-bug A fix for a bug with the current system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant