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

Refactor block/tx sanity checks to use txscript.ScriptFlags for feature toggling #52

Closed
tyler-smith opened this issue Oct 12, 2018 · 2 comments
Labels
enhancement New feature or request

Comments

@tyler-smith
Copy link
Member

PR #51 introduced a boolean flag for whether or not the magnetic anomaly hardfork is active for the purposes of counting sigops.

A better solution is to use the existing ScriptFlags defined in the txscript subpackage. This will allow us to represent all potentially toggled features with a single object instead of passing around a ton of booleans in the future.

After looking at the ABC code, they do pretty much the same thing with their BlockchainValidationOptions type: https://github.com/Bitcoin-ABC/bitcoin-abc/blob/efa9749bac3e20b2a8fc056c01d75e3dbc4e341d/src/validation.cpp#L3025

@tyler-smith tyler-smith added the enhancement New feature or request label Oct 12, 2018
@zquestz
Copy link
Contributor

zquestz commented Oct 12, 2018

I already started this work. It actually isn't too bad =)

@zquestz
Copy link
Contributor

zquestz commented Oct 18, 2018

Done

@zquestz zquestz closed this as completed Oct 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants