-
Notifications
You must be signed in to change notification settings - Fork 767
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
Cleanup String::from_utf8
usage in the pallet benchmarking
#389
Comments
I can take on this guys if you are ok with it @ggwpez |
Yes thats good, thanks @sudipghimire533 |
@ggwpez Looks like I am not sure which part are we referring. Can you please mention a example where the change should be brought. Thank you :) |
You can start by searching for |
Ahh ok PR 11908 took longer than expected. I'll try if I can give time. Thanks anyway :) |
@ggwpez can I take this on? |
Yes! Note that we cannot entirely use |
Got it, appreciate the tip, will keep it in mind |
# Description *Refactors `String::from_utf8` usage in the pallet benchmarking Fixes #389 --------- Co-authored-by: command-bot <>
# Description *Refactors `String::from_utf8` usage in the pallet benchmarking Fixes paritytech#389 --------- Co-authored-by: command-bot <>
* Implement public helpers for querying header info * Update `best_header` when importing headers * Add BestHeader to GenesisConfig * Define extra types for Millau primitives * Start implementing runtime APIs in Millau runtime * Add helper for getting headers which require a justification * Add runtime API for getting headers requiring a justification * Reword `expect()` proof for valid authority sets * Fix typo * Clean up Hasher comment * Add the Call Dispatch Pallet back to the Millau runtime * Use types from Rialto in bridge pallet config * Use the Rialto runtime APIS in the Millau runtime * Include Millau bridge instance in Rialto runtime * Add missing doc comment * Use one storage function for setting and clearing `RequiresJustification` * Remove TODO comments
👉 Good issue for newcomers (please dont pick up when you already have experience).
The state machine that is used in the
benchmark pallet
command returns a[u8]
instead of a string.This slice is then stored and converted to a string every time its needed somewhere.
It would be nice to instead directly convert it and then store the string. This would get rid of a many
String::from_utf8(…).expect("Encoded from String; qed")
.The text was updated successfully, but these errors were encountered: