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.
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-
sipa commented at 3:02 PM on November 29, 2014: member
-
Report script evaluation failures in log and reject messages 307f7d48d4
-
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.
sipa force-pushed on Dec 2, 2014laanwj commented at 9:14 AM on December 3, 2014: memberGood idea, going to test this
gmaxwell commented at 9:20 AM on December 3, 2014: contributorHad a couple instances of personal confusion due to this, so I agree with the idea.
laanwj merged this on Dec 4, 2014laanwj closed this on Dec 4, 2014laanwj referenced this in commit 9ddc8c63ab on Dec 4, 2014MarcoFalke 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-04-13 15:15 UTC
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-04-13 15:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me