HomePhabricator

Give more descriptive error when parsing partial-byte hex values

Description

Give more descriptive error when parsing partial-byte hex values

Summary: Fixes T312. 0x0 and 0x001 are examples of hex values that fail the script parser. This isn't immediately obvious unless you're familiar with the code, and the script fails with a totally useless and generic error message.

Test Plan: make check + make check with script_tests.json having one line changed 0x02 -> 0x2 (fails with the expected error)

Reviewers: deadalnix, schancel, #bitcoin_abc

Reviewed By: deadalnix, #bitcoin_abc

Subscribers: teamcity

Maniphest Tasks: T312

Differential Revision: https://reviews.bitcoinabc.org/D1290

Details

Provenance
jasonbcoxAuthored on Apr 17 2018, 00:42
deadalnixPushed on Apr 17 2018, 00:54
Reviewer
Restricted Project
Differential Revision
D1290: Give more descriptive error when parsing partial-byte hex values
Parents
rSTAGING8716d6334f44: Add extra info to script parsing error to make debugging easier
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/3523
Tasks
Restricted Maniphest Task