-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
unixfs: fix dagTruncate
to preserve node type
#5216
unixfs: fix dagTruncate
to preserve node type
#5216
Conversation
All of the truncation related tests of the |
@whyrusleeping WDYT? (This is my most blocking issue at the moment.) |
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.
This looks right to me. Good catch!
On the |
Great, do you know how was
Yes, will add that. |
Extract the original `FSNode` passed inside the `ipld.Node` argument and modify its `Blocksizes` (removing all of them and re-adding the ones that were not truncated). In contrast, the replaced code was creating a new `FSNode` that was not preserving some of the features of the original one. Change `TRUNC_HASH` values in `sharness` that were created with the bug to the correct values. License: MIT Signed-off-by: Lucas Molas <[email protected]>
License: MIT Signed-off-by: Lucas Molas <[email protected]>
License: MIT Signed-off-by: Lucas Molas <[email protected]>
Fixed |
Tests are passing now (minus Jenkins..) so @whyrusleeping I think this is RFM now. |
So, in a weird series of coincidences that I don't fully understand I need to fix this old bug (which I already fixed in the PR #4758 that I never finished) to be able to refactor some parts of the code of the DAG reader (see #5192 (comment)).
I'm selfishly assigning this PR a high priority to get it merged as soon as possible after the upcoming release, as it will simplify my work on the DAG reader.
Fixes #4519.