-
Notifications
You must be signed in to change notification settings - Fork 20.1k
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
trie : use trie.NewStackTrie instead of new(trie.Trie) #22246
Conversation
It will cause |
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.
Yes, makes definite sense to me
I'd love to get rid of it, but if so we need to solve the import cycle problem. ISTR it's not just tests, but other things that are hard to solve |
Stack trie assume we insert sorted keys, right? Are we sure all these use cases do that? |
Yes, it does. However, all these usecases, unless I've missed something, is used (eventually) to feed into DeriveSha, which (nowadays) ensure that the keys are sorted. If I missed something, then that would be bad :/ |
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. This PR changes to use stackTrie
in places that either directly call into DeriveSha
, or types.NewBlock
, where the hasher is only used for call into DeriveSha
.
No description provided.