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

New clvm generator api #9645

Merged
merged 2 commits into from
Jan 11, 2022
Merged

New clvm generator api #9645

merged 2 commits into from
Jan 11, 2022

Conversation

arvidn
Copy link
Contributor

@arvidn arvidn commented Dec 21, 2021

It uses the more compact return value from run_generator2() and converts it to our internal (more verbose) conditions format.

@lgtm-com
Copy link

lgtm-com bot commented Dec 23, 2021

This pull request fixes 2 alerts when merging d053ae5 into 659f4f4 - view on LGTM.com

fixed alerts:

  • 1 for Unused import
  • 1 for Missing call to `__init__` during object initialization

@arvidn arvidn force-pushed the new-clvm-generator-api branch 2 times, most recently from 0a87589 to dc2ad48 Compare January 11, 2022 19:44
if r.seconds_relative > 0:
add_int_cond(conditions, ConditionOpcode.ASSERT_SECONDS_RELATIVE, r.seconds_relative)
for cc in r.create_coin:
if cc[2] == b"":
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is a slight difference. the new clvm_rs API always returns a 3-tuple with the last element being bytes. If there is no hint, the bytes is empty. However, previously, an empty atom was a valid hint, distinct from no hint at all.

Since hints aren't consensus critical, I don't think this really matters, but it meant I had to change the test_rom.py below.

@arvidn arvidn marked this pull request as ready for review January 11, 2022 22:39
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.

Okay, I think I get it.

@wjblanke wjblanke merged commit 0ba838b into main Jan 11, 2022
@AmineKhaldi AmineKhaldi deleted the new-clvm-generator-api branch June 18, 2022 10:28
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