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 functions get_flags_for_height_and_constants() and get_conditions_from_spendbundle() #634

Merged
merged 15 commits into from
Aug 6, 2024

Conversation

matt-o-how
Copy link
Contributor

Also includes Pybindings for these functions

@matt-o-how matt-o-how requested a review from arvidn July 31, 2024 12:43
Copy link

coveralls-official bot commented Jul 31, 2024

Pull Request Test Coverage Report for Build 10252201076

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 120 of 143 (83.92%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+8.4%) to 83.007%

Changes Missing Coverage Covered Lines Changed/Added Lines %
crates/chia-consensus/src/gen/test_generators.rs 1 2 50.0%
wheel/src/api.rs 2 24 8.33%
Totals Coverage Status
Change from base Build 10218445370: 8.4%
Covered Lines: 11802
Relevant Lines: 14218

💛 - Coveralls

Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

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

We should have test coverage for both of these functions

crates/chia-consensus/src/spendbundle_conditions.rs Outdated Show resolved Hide resolved
crates/chia-consensus/src/spendbundle_conditions.rs Outdated Show resolved Hide resolved
crates/chia-consensus/src/spendbundle_conditions.rs Outdated Show resolved Hide resolved
crates/chia-consensus/src/spendbundle_conditions.rs Outdated Show resolved Hide resolved
Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

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

that test doesn't really cover very much of the functionality of that function. Let's discuss in keybase how we can approach this. The run_block_generator() tests actually run full blocks and ensure all the conditions it returns match the expected one. Those test cases are defined in separate text files.

crates/chia-consensus/src/spendbundle_conditions.rs Outdated Show resolved Hide resolved
matt-o-how and others added 3 commits August 2, 2024 18:26
…Conditions (to enable reusing existing test facilities). Extend the tests to cover the block-generator test cases
matt-o-how and others added 2 commits August 5, 2024 10:57
Copy link
Contributor

@arvidn arvidn left a comment

Choose a reason for hiding this comment

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

test coverage looks good now!
let's make sure to squash the commits when landing this

wheel/generate_type_stubs.py Outdated Show resolved Hide resolved
@Rigidity
Copy link
Contributor

Rigidity commented Aug 5, 2024

Otherwise, lgtm

@arvidn arvidn merged commit 5f920ce into main Aug 6, 2024
57 checks passed
@arvidn arvidn deleted the get_flags_and_get_conditions branch August 6, 2024 11:11
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.

3 participants