HomePhabricator

[backport#13655] bitcoinconsensus: invalid flags error should be set to…

Description

[backport#13655] bitcoinconsensus: invalid flags error should be set to bitcoinconsensus_err

Summary:
417b6c1d2990ffc78c029442e027797d724a101f bitcoinconsensus: invalid flags should be set to bitcoinconsensus_error type, add test cases covering bitcoinconsensus error codes (Thomas Kerin)

Pull request description:

A check was added to the bitcoinconsensus verify_script codepath to ensure that callers only used _exposed_ interpreter flags. I think this error should be written to `bitcoinconsensus_err* err` and not returned by verify_script?

I modified the check so it indicates the error using *err like the others, and added tests covering the error codes.


Backport of Core PR13655

Test Plan:

ninja all check check-functional

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8804

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Jul 18 2018, 14:57
majcostaCommitted on Jan 6 2021, 20:51
majcostaPushed on Jan 6 2021, 20:51
Reviewer
Restricted Project
Differential Revision
D8804: [backport#13655] bitcoinconsensus: invalid flags error should be set to bitcoinconsensus_err
Parents
rABCb0c3da0fbb80: Refactor from path 145/245 to path 1899 with migration support
Branches
Unknown
Tags
Unknown