HomePhabricator

Correct the PUSHDATA4 minimal encoding test.
d8f4cc328edeUnpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Correct the PUSHDATA4 minimal encoding test.

The test which is intended to prove that the script engine is properly
rejecting non-minimally encoded PUSHDATA4 data is using the wrong
opcode and value. The test is using 0x4f, which is OP_1NEGATE instead
of the desired 0x4e, which is OP_PUSHDATA4. Further, the push of data
is intended to be 256 bytes, but the value the test is using is
0x00100000 (4096), instead of the desired 0x00010000 (256).

This commit fixes both issues.

This was found while examining the branch coverage in btcd against only
these tests to help find missing branch coverage.

Details

Provenance
Dave Collins <davec@conformal.com>Authored on Apr 28 2015, 02:39
deadalnixPushed on May 14 2017, 22:04
Parents
rABC1d9d314573ee: Merge pull request #5696
Branches
Unknown
Tags
Unknown

Event Timeline

Dave Collins <davec@conformal.com> committed rABCd8f4cc328ede: Correct the PUSHDATA4 minimal encoding test. (authored by Dave Collins <davec@conformal.com>).Apr 28 2015, 02:47