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

chore: improve SyncSummary information #513

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Conversation

tomyrd
Copy link
Collaborator

@tomyrd tomyrd commented Sep 3, 2024

closes #512

This PR changes the fields from SyncSummary from quantities to lists of elements. This information can be used to get information on the specific elements that were updated in a sync.

@tomyrd tomyrd marked this pull request as ready for review September 4, 2024 20:16
Comment on lines +111 to +129
let notes = maybe_await!(self.get_input_notes(NoteFilter::Committed))?
.into_iter()
.chain(maybe_await!(self.get_input_notes(NoteFilter::Processing))?)
.filter(|note| {
nullifiers.contains(
&Nullifier::from_hex(note.nullifier())
.expect("Note should have valid nullifier"),
)
})
.collect();
Copy link
Collaborator

Choose a reason for hiding this comment

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

This may be done in a single query, what do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Queries similar to this are made in other parts of the client. I agree that it's a good idea to merge them. I can tackle it in #489

Copy link
Collaborator

@SantiagoPittella SantiagoPittella left a comment

Choose a reason for hiding this comment

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

If it is ok for you, we can address my previous comment after the refactor of the store. But please add it to the issue so we don't forget about this. Thx!

Copy link
Contributor

@bobbinth bobbinth left a comment

Choose a reason for hiding this comment

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

Looks good! Thank you!

@igamigo igamigo merged commit 801c0e4 into next Sep 10, 2024
13 checks passed
@igamigo igamigo deleted the tomyrd-improve-syncsummary branch September 10, 2024 17:06
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.

4 participants