-
Notifications
You must be signed in to change notification settings - Fork 45
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
Domain separator during merge #40
Conversation
c69c88f
to
03a7f48
Compare
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.
Thanks @0xkanekiken looks to me good overall! Just a few small things inline
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.
Looks great to me, thank you!
Signed-off-by: 0xKanekiKen <100861945+0xKanekiKen@users.noreply.github.com>
7bc816f
to
f0d0ad9
Compare
Thanks @grjte and @Al-Kindi-0 for the review. I've worked on your suggestions. |
f0d0ad9
to
b977239
Compare
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.
Looks good, thank you! I'd prefer to update the one doc comment from "separator" to "identifier", but I won't block it over that. I'll leave it to you to merge, and you can make that change if you want.
Signed-off-by: 0xKanekiKen <100861945+0xKanekiKen@users.noreply.github.com>
b977239
to
5757b89
Compare
Thanks! I've updated the doc string. |
@@ -51,6 +52,40 @@ fn hash_elements_vs_merge() { | |||
assert_eq!(m_result, h_result); | |||
} | |||
|
|||
#[test] | |||
fn hash_elements_vs_merge_in_domain() { |
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 think the name of this test is a bit confusing: we are not testing whether hash_elements()
produces a different result from merge_in_domain()
but rather if merge_in_domain()
is valid. So, I would probably rename this test to merge_in_domain()
.
Also, I wonder if we can replace this test with tests which do the following:
merge()
andmerge_in_domain()
give the same result when domain isZERO
.merge_in_domain()
gives two different results if the domains are different.
Describe your changes
This PR addresses #35. It introduces a new method
merge_in_domain
as mentioned by @bobbinth here when impl Rpo256.Checklist before requesting a review
next
according to naming convention.