-
Notifications
You must be signed in to change notification settings - Fork 47
Miniscript safety #75
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
Conversation
bitcoin/script/miniscript.h
Outdated
|
|
||
| //! Do all sanity checks. | ||
| bool IsSafeTopLevel() const { return GetType() << "Bms"_mst && CheckOpsLimit() && CheckStackSize(); } | ||
| bool IsSane() const { return GetType() << "m"_mst && CheckOpsLimit() && CheckStackSize() && IsValid(); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that there is an IsSane(), perhaps all the ad-hoc sanity checks in the compiler can be replaced with just a call to this? (see Compilation::Add).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this would be updated with k property too based on what gets merged first
…opLevel() Signed-off-by: Antoine Poinsot <[email protected]>
Signed-off-by: Antoine Poinsot <[email protected]>
|
Rebased after #41 merge |
|
ACK 253172e |
Based on #72 this separates
IsSafeandIsSafeTopLevelas suggested in #41 (comment) .