-
Notifications
You must be signed in to change notification settings - Fork 111
[crypto] Give Committable
and Digestible
associated types
#945
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
Conversation
cryptography/src/lib.rs
Outdated
/// An object that shares a (commitment) [Digest] with other, related values. | ||
pub trait Committable<D: Digest>: Clone + Sized + Send + Sync + 'static { | ||
/// An object that can produce a commitment of itself. | ||
pub trait Committable: Clone + Sized + Send + Sync + 'static { |
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.
We could add Committable: Digestible
to make:
pub struct Engine<E: Clock + Spawner + Metrics, P: Array, M: Committable + Digestible + Codec> {
into
pub struct Engine<E: Clock + Spawner + Metrics, P: Array, M: Committable + Codec> {
but I think it'd be OK to leave as is, too.
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.
As discussed offline, I think it makes sense to keep these separate 👍
index.html
Outdated
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 this snuck in here @danlaine
pub struct Engine< | ||
E: Clock + Spawner + Metrics, | ||
P: Array, | ||
Dc: Digest, |
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.
Not sure why I didn't think to myself "there must be a better way" when adding this 😓 .
Codecov ReportAttention: Patch coverage is
@@ Coverage Diff @@
## main #945 +/- ##
=======================================
Coverage 90.79% 90.79%
=======================================
Files 190 190
Lines 52630 52632 +2
=======================================
+ Hits 47787 47789 +2
Misses 4843 4843
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
No description provided.