Skip to content

Conversation

@LarryRuane
Copy link
Collaborator

Cherry-pick bitcoin/bitcoin#16577

@LarryRuane LarryRuane added the C-bug Category: This is a bug label Dec 13, 2019
Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

There is very comprehensive review in the upstream PR (nice work @LarryRuane!)

One blocking comment about the license header, otherwise utACK.

Copy link
Contributor

Choose a reason for hiding this comment

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

This line (and similar) differ from the upstream commit because we have not cherry-picked bitcoin/bitcoin#9902.

Copy link
Contributor

Choose a reason for hiding this comment

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

This PR uses GetRandInt instead of InsecureRandRange because we have not cherry-picked bitcoin/bitcoin#10321.

Copy link
Contributor

Choose a reason for hiding this comment

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

These differ from the upstream PR because we haven't cherry-picked bitcoin/bitcoin#12740.

Copy link
Contributor

Choose a reason for hiding this comment

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

This uses 50 iterations in the upstream PR, but if this isn't too slow then I'm fine with more iterations here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was an oversight on my part; I wanted to do a little extra testing and forgot to change it back to 50. The time (both CPU and real) to run this test is about 1.4s with 50 iterations, and 1.7s with 500 iterations. It's probably worth the 0.3 seconds to get better test coverage, so I'll leave it at 500.

src/streams.h Outdated
Comment on lines +534 to +535
Copy link
Contributor

Choose a reason for hiding this comment

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

These changes are in this PR because we haven't cherry-picked bitcoin/bitcoin#8808.

Copy link
Collaborator Author

@LarryRuane LarryRuane left a comment

Choose a reason for hiding this comment

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

Thank you for the review, @str4d, force-pushed (but no rebase) to fix the one blocking suggestion.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This was an oversight on my part; I wanted to do a little extra testing and forgot to change it back to 50. The time (both CPU and real) to run this test is about 1.4s with 50 iterations, and 1.7s with 500 iterations. It's probably worth the 0.3 seconds to get better test coverage, so I'll leave it at 500.

@str4d str4d requested a review from daira February 13, 2020 15:36
@str4d str4d added this to the Core Sprint 2020-07 milestone Feb 19, 2020
@str4d str4d added the S-scratching-an-itch Status: Something we haven't planned for a sprint but are doing anyway label Feb 19, 2020
@str4d
Copy link
Contributor

str4d commented Feb 27, 2020

Timing out on @daira's review request.

@zkbot r+

@zkbot
Copy link
Contributor

zkbot commented Feb 27, 2020

📌 Commit 0030574 has been approved by str4d

@zkbot
Copy link
Contributor

zkbot commented Feb 27, 2020

⌛ Testing commit 0030574fdea546e34bf45fb7b20b92ff72f86264 with merge 28e0a729959b7670d22cee6ae124757dddf63ddb...

@zkbot
Copy link
Contributor

zkbot commented Feb 27, 2020

💔 Test failed - pr-merge

Copy link
Contributor

@str4d str4d left a comment

Choose a reason for hiding this comment

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

Test failed because #3858 was merged, which pulled in bitcoin/bitcoin#8914. Please rebase the PR.

@LarryRuane LarryRuane force-pushed the CBufferedFile-fixes branch from 0030574 to fd94e27 Compare March 3, 2020 00:53
@LarryRuane LarryRuane force-pushed the CBufferedFile-fixes branch from fd94e27 to 75251cb Compare March 3, 2020 01:04
@str4d
Copy link
Contributor

str4d commented Mar 3, 2020

@zkbot r+

@zkbot
Copy link
Contributor

zkbot commented Mar 3, 2020

📌 Commit 75251cb has been approved by str4d

@zkbot
Copy link
Contributor

zkbot commented Mar 3, 2020

⌛ Testing commit 75251cb with merge 26a24da...

@zkbot
Copy link
Contributor

zkbot commented Mar 3, 2020

☀️ Test successful - pr-merge
Approved by: str4d
Pushing 26a24da to master...

@zkbot zkbot merged commit 26a24da into zcash:master Mar 3, 2020
@LarryRuane LarryRuane deleted the CBufferedFile-fixes branch March 10, 2020 04:29
DeckerSU added a commit to DeckerSU/KomodoOcean that referenced this pull request Mar 16, 2020
bitcoin/bitcoin#16577
zcash/zcash#4265

- added CBufferedFile fix (thx LarryRuane)
- added unit test (streams_tests.cpp rewritten for Google C++ Testing Framework
- additional komodo_block_load test (read 2 blocks from binary file)
- removed CBufferedFile::SetAnyPos method (had incorrect logic)
- removed komodo_index2pubkey33, komodo_blockload (as not-used and related to SetAnyPos)
-
DeckerSU added a commit to DeckerSU/komodo that referenced this pull request Mar 17, 2020
- added CBufferedFile fix (thx LarryRuane)
- added unit test (streams_tests.cpp rewritten for Google C++ Testing Framework)
- additional komodo_block_load test (read 2 blocks from binary file)

bitcoin/bitcoin#16577
zcash#4265
DeckerSU/KomodoOcean@9700247
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-bug Category: This is a bug S-scratching-an-itch Status: Something we haven't planned for a sprint but are doing anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants