-
Notifications
You must be signed in to change notification settings - Fork 39
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
HTTP message service handles signed entities #1366
Conversation
Test Results 3 files ±0 30 suites ±0 7m 33s ⏱️ -10s Results for commit adc59bd. ± Comparison against base commit b36415b. This pull request removes 5 and adds 13 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
1d02d35
to
7a83852
Compare
7bbe415
to
e804163
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.
Do we still need to keep the previous message adapters that are not used anymore?
async fn get_snapshot() { | ||
let beacon = fake_data::beacon(); | ||
let entity = SignedEntity { | ||
signed_entity_id: "msd1".to_string(), |
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.
It's a bit confusing to use Mithril stake distribution code in snapshot test.
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.
Sorry, I don't see the issue here.
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.
signed_entity_id: "msd1".to_string(), | |
signed_entity_id: "snapshot1".to_string(), |
.await?; | ||
|
||
entities.into_iter().map(|i| i.try_into()).collect() | ||
} | ||
} | ||
|
||
#[cfg(test)] |
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.
Given all the boilerplate in these tests, it would have been a good idea to create dummy functions for SignedEntity<T>
types IMHO.
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 have no comments other than those raised by @jpraynaud. Otherwise, LGTM
They are still used mainly in tests in |
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 👍
Content
This PR includes a patch that use the HTTP message service to deliver directly HTTP messages for signed entities to the web server. By doing so, it avoids expensive key decode / encode.
Pre-submit checklist
Comments
None
Issue(s)
Relates to #1327