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

refactors #632

Merged
merged 3 commits into from
Jul 31, 2024
Merged

refactors #632

merged 3 commits into from
Jul 31, 2024

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Jul 30, 2024

these commits are best reviewed one at a time. They are mostly unrelated other than factoring out common code into functions.

  1. Preparing the arguments passed into a block generator was pulled out into setup_generator_args(). It was also made more generic to accept any iterator of block refs, rather than a slice of block refs.
  2. extracting a slice from a python buffer was factored out into py_to_slice() function. it panics if the buffer isn't contiguous (which they should all be).
  3. Some error handling was simplified in run_chia_program() and get_puzzle_and_solution() allowing some old code to be removed.

Copy link

Pull Request Test Coverage Report for Build 10163544102

Details

  • 79 of 108 (73.15%) changed or added relevant lines in 4 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+4.1%) to 82.751%

Changes Missing Coverage Covered Lines Changed/Added Lines %
wheel/src/run_generator.rs 40 50 80.0%
wheel/src/api.rs 2 21 9.52%
Files with Coverage Reduction New Missed Lines %
wheel/src/api.rs 1 78.27%
Totals Coverage Status
Change from base Build 10148199606: 4.1%
Covered Lines: 11667
Relevant Lines: 14099

💛 - Coveralls

@arvidn arvidn requested a review from Rigidity July 30, 2024 14:30
@arvidn arvidn merged commit ce4fff3 into main Jul 31, 2024
65 checks passed
@arvidn arvidn deleted the setup_generator_args branch July 31, 2024 00:05
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