Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(rln-relay): process blocks atomically #1349
feat(rln-relay): process blocks atomically #1349
Changes from 17 commits
463e1a4
9faa33f
6ab0031
3e804a4
1468c36
adb5c60
0a60042
83dae90
dd8518e
6de3978
4551a7d
fb7853b
8b0ff46
b77d7c6
d40636d
83e8794
f23350e
84a72e3
8ca5216
c885640
032cc4c
14f833b
e239b61
37bd29f
ff02842
8c08ed1
0daf6c1
0a5f79f
5a6ec33
ec52697
c40aee6
33cba52
868be86
9835897
0ddcd11
5919e05
103c80b
c1d9c16
54dca37
71f9343
71c5bfd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would keep both insertMember (that calls set and sets next available leaf) and insertMembers, where you need to specify the index. The two API have different use cases and the first one is used where you don't care/know about next available index.
So I would structure this test by keeping previous checks and by having a batch insertion (that maybe replicates previous single inserts).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in c40aee6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a good spot to test batch insertion: you generate a vector of leaves and replace the element at position index with the target commitment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 032cc4c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"members" is already in the form you need (i.e. at "index" you have the interesting commitment key): I meant why not just do a single batch addition from 0 of "members" rather than 3 operations as of now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 0ddcd11. I figured you wanted it to be inserted separately from your comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible, I'd move all the checks to the end of the test case, under the "THEN" section. Checks within a
Future
usually are problematic when debugging.This can be taken as a separate piece. Not blocking, but important.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tracking #1358 thanks!