Report script evaluation failures in log and reject messages #5394

pull sipa wants to merge 1 commits into bitcoin:master from sipa:logscriptfail changing 2 files +19 −12
  1. sipa commented at 3:02 PM on November 29, 2014: member

    It's pretty annoying that master does not give any indication about what failed in a script evaluation when transactions are refused. This adds the script failure reason to the log, the reject messages, and the sendrawtransaction failure string.

  2. Report script evaluation failures in log and reject messages 307f7d48d4
  3. in src/main.h:None in f3f92a8a0c outdated
     326 | @@ -325,12 +327,13 @@ class CScriptCheck
     327 |      unsigned int nIn;
     328 |      unsigned int nFlags;
     329 |      bool cacheStore;
     330 | +    ScriptError *error;
    


    laanwj commented at 6:12 AM on December 2, 2014:

    Maybe change this to a ScriptError instead of a pointer to one, and add another method to retrieve the value (or make operator() return it too). As CScriptCheck is meant to be an async command object, keeping a pointer around where a result will be written at some point may lead to bugs.


    sipa commented at 9:16 PM on December 2, 2014:

    Good suggestion, much cleaner code. Fixed.

  4. sipa force-pushed on Dec 2, 2014
  5. laanwj commented at 9:14 AM on December 3, 2014: member

    Good idea, going to test this

  6. gmaxwell commented at 9:20 AM on December 3, 2014: contributor

    Had a couple instances of personal confusion due to this, so I agree with the idea.

  7. sipa cross-referenced this on Dec 3, 2014 from issue Report missing inputs in sendrawtransaction by sipa
  8. laanwj commented at 3:39 PM on December 4, 2014: member

    Works for me. Tested ACK commithash 307f7d48d4733da016bf73676f6ebff9144365c1 (signature)

  9. laanwj merged this on Dec 4, 2014
  10. laanwj closed this on Dec 4, 2014

  11. laanwj referenced this in commit 9ddc8c63ab on Dec 4, 2014
  12. bitcoin locked this on Sep 8, 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: 2026-05-20 06:55 UTC