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 AssumeValidArg enum and correct verify_script #131

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

JoseSK999
Copy link
Contributor

@JoseSK999 JoseSK999 commented Mar 14, 2024

I have added the AssumeValidArg enum to make the disabled and hardcoded options explicit, as discussed in #126.

Also I have changed verify_script to check whether there's an assume-valid hash, and if so also check if the block is in the best chain (now, if it is forked we won't assume the scripts). We no longer use the assume_valid field height, as we directly fetch the disk header (in order to verify the state of the block).

Updated the two examples. In florestad/src/main.rs I add a temporary conversion to AssumeValidArg, in next changes we could modify slightly the Command enum such that the assume-valid argument has this type.

@Davidson-Souza
Copy link
Collaborator

ACK 76ee39e. Pretty cool approach, looks a lot cleaner now.

@Davidson-Souza Davidson-Souza merged commit b0b3e68 into vinteumorg:master Mar 18, 2024
6 checks passed
@JoseSK999 JoseSK999 deleted the fix-assumevalid branch March 18, 2024 16:28
@JoseSK999
Copy link
Contributor Author

Thanks!!

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