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

add test coverage for read_resume_data() #7610

Merged
merged 1 commit into from
Feb 17, 2024
Merged

add test coverage for read_resume_data() #7610

merged 1 commit into from
Feb 17, 2024

Conversation

arvidn
Copy link
Owner

@arvidn arvidn commented Feb 17, 2024

when v1 or v2 hashes do not match the torrent metadata

@@ -135,11 +135,6 @@ namespace {
{
ec = err;
}
else if (((ret.info_hashes.has_v1() && ret.info_hashes.v1 != ret.ti->info_hashes().v1)
|| (ret.info_hashes.has_v2() && ret.info_hashes.v2 != ret.ti->info_hashes().v2)))
Copy link
Owner Author

Choose a reason for hiding this comment

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

@glassez this is the same check as on line 128 (but inverted), so I moved the block to its else-block

Copy link
Contributor

Choose a reason for hiding this comment

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

👍
I didn't even notice that info hash is calculated before torrent info is parsed.

@arvidn arvidn merged commit fb226a4 into RC_2_0 Feb 17, 2024
41 of 42 checks passed
@arvidn arvidn deleted the resume-data-test branch February 17, 2024 20:29
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