This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Crypto Pair trait refactory #13657
Merged
Merged
Crypto Pair trait refactory #13657
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9c1c381
Crypto pair refactory
davxy aa48fca
Remove unused method
davxy 219327c
Merge branch 'master' into davxy-crypto-pair-refactory
davxy e86ed44
Apply review suggestions
davxy b712209
Cargo fmt
davxy 14c1465
Remove leftovers
davxy 5c619c1
Associated type is not really required
davxy 282095a
Fix after refactory
davxy dd5e206
Merge branch 'master' into davxy-crypto-pair-refactory
davxy b559b10
Fix benchmark-ui test
davxy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Maybe we should add some debug assert that
big_seed.len() > seed_slice.len()
? Otherwise there may will be some implementation that will just use some zeros?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.
Yeah probably would be better to fail than filling the tail of the seed with zeroes.
But what about embedding the only function that
substrate-bip39
offers directly into substrate?As I said that library provides 1 function (the other is not used anymore after this pr).
The function is this:
Sounds a bit bombastic to define a library only to provide a function...
Furthermore, we can then easily modify it to fill a
mut slice
(passed as parameter) to fill it with an arbitrary number of bytes... Thus there would be no need to check if we can fill the seed buffer because we always canThere 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 real opinion here. We can copy the function, I don't really care. I don't know the history behind the substrate-bip39 crate.