Page MenuHomePhabricator

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

Authored by majcosta on Jan 6 2021, 10:46.

Details

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

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

majcosta requested review of this revision.Jan 6 2021, 10:46
majcosta edited the summary of this revision. (Show Details)

readded test case using bitcoinconsensus_SCRIPT_ENABLE_SIGHASH_FORKID instead

This revision is now accepted and ready to land.Jan 6 2021, 14:56