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 new function run_puzzle() #138

Merged
merged 3 commits into from
Feb 9, 2023
Merged

add new function run_puzzle() #138

merged 3 commits into from
Feb 9, 2023

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Feb 8, 2023

This function runs a puzzle given a solution, and parses the resulting conditions. This is meant to be used for SpendBundle and CoinSpend handling.

This PR is split up into 3 commits:

  1. add implicit conversion of ValidationErr to PyErr to simplify the python binding
  2. split up the parse_spend_conditions() function into parse_single_spend() and parse_conditions() functions, since for run_puzzle() we just want to parse the conditions. In order to keep the interface between these functions simpler, the internal Spend type was amended with parent-coin-id and amount. This commit also splits the fuzzer into two separate targets.
  3. add the run_puzzle() function along with some (python) tests.

@arvidn arvidn marked this pull request as ready for review February 8, 2023 15:03
Copy link
Contributor

@richardkiss richardkiss left a comment

Choose a reason for hiding this comment

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

Looks good.

@arvidn arvidn merged commit f3a4b0d into main Feb 9, 2023
@arvidn arvidn deleted the run-puzzle branch February 9, 2023 09:21
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