Page MenuHomePhabricator

better error message for mandatory-flag tx rejections
ClosedPublic

Authored by markblundeberg on Tue, Aug 6, 20:12.

Details

Summary

Currently, if a transaction fails both a standardness rule and a consensus
rule, then the rejection message will look a bit weird, for example if
a script uses a NOPcode but also fails a VERIFY operation then:
"mandatory-script-verify-flag-failed (NOPx reserved for soft-fork upgrades)"

This change makes the error message reflect the actual violation, for
example:
"mandatory-script-verify-flag-failed (Script failed an OP_VERIFY operation)"

The main improvement is however in the upgrade-conditional error message,
as seen in the test.

The behaviour for non-mandatory failures is unchanged: the error message
will reflect the violation of a non-mandatory flag.

Test Plan

make check
./test/functional/test_runner.py
./test/functional/test_runner.py --with-gravitonactivation

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.