Skip to content
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

Fix some more typos #7750

Open
wants to merge 1 commit into
base: RC_2_0
Choose a base branch
from
Open

Conversation

xavier2k6
Copy link
Contributor

No description provided.

@@ -99,7 +99,7 @@ TORRENT_EXPORT void* session_create(int tag, ...)
va_list lp;
va_start(lp, tag);

fingerprint fing("LT", lt::version_major, lt::version_minor, lt::version_tiny, 0);
fingerprint find("LT", lt::version_major, lt::version_minor, lt::version_tiny, 0);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think fing is supposed to refer to "fingerprint"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, will exclude....(another thing to be added to exclusion list from my other PR)

int const num_leafs = merkle_num_leafs(num_pieces * blocks_per_piece);
int const num_nodes = merkle_num_nodes(num_leafs);
int const first_leaf = merkle_first_leaf(num_leafs);
int const num_leaves = merkle_num_leaves(num_pieces * blocks_per_piece);
Copy link
Owner

@arvidn arvidn Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about this change. "leaf" is a term of art in computer science. Perhaps mostly used as adjective to describe the leaf nodes. I hesitate to call them "leaves" as that implies actual leaves on actual trees (not the computer science data structure "tree").

They are currently (as far as I know) consistently referred to as "leafs". I kind of see the "node" as implied in that name. Perhaps this is a controversial perspective. I would rather rename these "leaf_nodes" over "leaves". But I also think the current acronym is quite reasonable.

I think the change is controversial mostly because it's already internally consistent, and a rename would have to make sure it's consistently renamed everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leaves are already mentioned throughout some parts of code in repo:
https://github.com/search?q=repo%3Aarvidn%2Flibtorrent%20leaves&type=code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants