Commit graph

2 commits

Author SHA1 Message Date
Dave Collins
a22da99f91 Convert script errors to RuleErrors.
This commit modifies the error return type for errors during script
validation to use the RuleError so they are consistent with the rest of
the errors.  This also helps the calling code differentiate blocks
rejected due to script parsing and validation errors as opposed to
internal issues such as inability to read from the disk.

To accomplish this, two new two new RuleErrors, ErrScriptMalformed and
ErrScriptValidation, have been added.

Also, the errors for script parsing issues and script validation errors
have been improved to include both transaction hashes and indexes involved
in the validation effort.  Previously script parsing issues had almost no
additional information as to which transaction input/outputs the failing
script came from.
2014-06-26 23:47:14 -05:00
Dave Collins
0550bbbdc5 Add tests for new RuleError and ErrorCode types. 2014-06-24 19:14:30 -05:00