You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While reviewing code for issue #4052 I came across the functions AddNodeLink and AddNodeLinkClean that would seem to have the same code except for an extra line in AddNodeLink where the name is set to the link that will be added, but the link name is not used in the AddRawLink function that receives the link (as the name is specified as a separate argument), and the link itself seems to be discarded after the call (its members Size and Cid are copied but not the link structure).
Both functions are equally used in the code base but I'm failing (from reading the code and the comments) to see their difference, am I missing something?
The text was updated successfully, but these errors were encountered:
No, that looks like duplicate code. It looks like we used to cache children nodes inside link objects but don't do that anymore. Feel free to deduplicate.
(also, if I don't get back to you in a reasonable amount of time (e.g., 2 days) on a question, please hunt me down on IRC and yell at me)
@Stebalien So the name of the remaining function could be AddNodeLink? From the comments it seems like AddNodeLinkClean was the one that didn't cache the child node, but I don't think that would carry much meaning anymore.
(also, if I don't get back to you in a reasonable amount of time (e.g., 2 days) on a question, please hunt me down on IRC and yell at me)
While reviewing code for issue #4052 I came across the functions
AddNodeLink
andAddNodeLinkClean
that would seem to have the same code except for an extra line inAddNodeLink
where the name is set to the link that will be added, but the link name is not used in theAddRawLink
function that receives the link (as the name is specified as a separate argument), and the link itself seems to be discarded after the call (its membersSize
andCid
are copied but not the link structure).Both functions are equally used in the code base but I'm failing (from reading the code and the comments) to see their difference, am I missing something?
The text was updated successfully, but these errors were encountered: