-
Notifications
You must be signed in to change notification settings - Fork 11
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
DiskAddress is already a more efficient Option<> #341
Conversation
This removes Option<DiskAddress> from BranchNodes
Dump was failing because it was attempting to read a zero address
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.
Please no... I don't disagree with the change, but please not now lol
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, although, talked to @richardpringle offline, it seems this conflicts with his major refactor/work on Merkle with #344. Not sure how easy or does it make sense to rebase on top?
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.
Upon further review, I don't think that we should do this. It doesn't make sense to have an uninitialized DiskAddress
. The only valid place that I see this happening is related to Extension
nodes and currently, calling serialize
on a DiskAddress
that has not been initialized will panic.
Instead, DiskAddress
should simply wrap NonZeroUsize
, and parent types can use Option<DiskAddress>
.
Lets change DiskAddress to not be an Option. |
This removes Option from BranchNodes