Skip to content

Script error string parity with Bitcoin Core #393

@rkalis

Description

@rkalis

Hey guys. I compared the different kinds of Script errors in Bitcoin ABC and Bitcoin Core. Of course there are differences due to different functionality (e.g. ABC has CHECKDATASIGVERIFY and Core has WITNESS_MALLEATED). But I noticed two cases (SIG_PUSHONLY and CLEANSTACK) where the same error has a slightly different error string (because they were added or fixed independently of each other).

ABC:

case ScriptError::SIG_PUSHONLY:
    return "Only push operators allowed in signature scripts";
case ScriptError::CLEANSTACK:
    return "Script did not clean its stack";

Core:

case SCRIPT_ERR_SIG_PUSHONLY:
    return "Only push operators allowed in signatures";
case SCRIPT_ERR_CLEANSTACK:
    return "Extra items left on stack after execution";

These are small differences, but when testing the same scripts on BCH and BTC it is useful if the same errors give the same messages. Are you open to changing these error messages to match Core?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions