Improve CScriptNum error reporting #15074

pull jl2012 wants to merge 1 commits into bitcoin:master from jl2012:cscriptnum_error changing 6 files +88 −79
  1. jl2012 commented at 6:02 pm on January 1, 2019: contributor

    Instead of reporting “unknown error”, more specific messages are returned for CScriptNum related errors.

    Also replaced throw with assert in case opcode is negative or bigger than 0xff, which should never happen

  2. Improve CScriptNum error reporting 50605f0c34
  3. laanwj added the label Consensus on Jan 2, 2019
  4. DrahtBot commented at 4:42 pm on January 3, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #15045 ([test] Apply maximal flags to tx_valid tests and minimal flags to tx_invalid tests by jl2012)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  5. in src/script/interpreter.cpp:1078 in 50605f0c34
    1071@@ -1072,6 +1072,11 @@ bool EvalScript(std::vector<std::vector<unsigned char> >& stack, const CScript&
    1072                 return set_error(serror, SCRIPT_ERR_STACK_SIZE);
    1073         }
    1074     }
    1075+    catch (ScriptError runtime_error)
    1076+    {
    1077+        return set_error(serror, runtime_error);
    1078+
    


    practicalswift commented at 9:27 am on January 5, 2019:
    Nit: Remove redundant newline at end of block :-)

    laanwj commented at 2:03 pm on January 15, 2019:
    Also our catch syntax is } catch (ScriptError runtime_error) { — but let’s first get Concept ACKs on this before nitting it
  6. fanquake added the label Needs Conceptual Review on Aug 29, 2019
  7. fanquake added this to the "Chasing Concept ACK" column in a project

  8. fanquake commented at 7:41 am on September 16, 2019: member
    Going to take this over in a new PR.
  9. fanquake closed this on Sep 16, 2019

  10. fanquake removed this from the "Chasing Concept ACK" column in a project

  11. fanquake removed the label Needs Conceptual Review on Sep 16, 2019
  12. fanquake referenced this in commit 87a8cbf5dc on Sep 16, 2019
  13. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-11-23 09:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me