-
Notifications
You must be signed in to change notification settings - Fork 11.3k
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
Wrap NW Cert in versioned enum #9878
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ |
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.
LGTM. Fix CI then pick into 0.29?
narwhal/types/src/primary.rs
Outdated
let mut ret = self.header.digest() == other.header.digest(); | ||
match (self, other) { | ||
(Certificate::V1(data), Certificate::V1(other_data)) => data.eq(other_data), | ||
_ => false, |
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.
Just remove the false variant for now? We can add it back in future. One way to avoid missing variant, is to only add match arms for (Certificate::Vi(data), Certificate::Vi(other_data))
and (Certificate::Vi(data), _)
, and not add match arm for _
.
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.
Actually thats a good point, I will remove all wildcard checks for now and if anyone adds a variant the rust compiler will complain and notify us to update this as well.
+ fix format test
af3bd55
to
af66292
Compare
## Test Plan Unit Test & Benchmark
Test Plan
Unit Test & Benchmark