Page MenuHomePhabricator

better error message for mandatory-flag tx rejections

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



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
"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/ --with-gravitonactivation

Diff Detail

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