-
Notifications
You must be signed in to change notification settings - Fork 42
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
Removed unnecessary EMPTY_STORAGE_MAP_ROOT
const
#916
Conversation
EMPTY_STORAGE_MAP_ROOT
constEMPTY_STORAGE_MAP_ROOT
const
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.
Thank you! Overall, the changes look fine, but I'm not sure I understand the motivation behind the change. It seems to me that having a single constant is a bit better than using EmptySubtreeRoots::entry(StorageMap::STORAGE_MAP_TREE_DEPTH, 0)
in a couple of places.
Ideally, we'd set this constant as:
pub const EMPTY_STORAGE_MAP_ROOT: Word = EmptySubtreeRoots::entry(StorageMap::STORAGE_MAP_TREE_DEPTH, 0);
But I'm not sure if that's possible.
ae9f924
to
e1140b2
Compare
Yes, it's possible, please take a look! |
# Conflicts: # CHANGELOG.md
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.
Looks good! Thank you!
In this PR we remove unnecessary
EMPTY_STORAGE_MAP_ROOT
constant in favor of usingEmptySubtreeRoots::entry()
method frommiden-crypto
.