Page MenuHomePhabricator

wallet: Do not turn OP_1NEGATE in scriptSig into 0x0181 in signing code
Changes PlannedPublic

Authored by PiRK on Thu, Sep 9, 13:17.


Group Reviewers
Restricted Project

A rebase of #13084 which additionally modifies the test code (unaddressed in the original, assuming sipa is too busy to deal with this at the moment).

Relatively simple bugfix so it'd be good to have merged soon.

Turning OP_1NEGATE into 0x0181 results in a larger-than-necessary data push instead of just actually using the OP_1NEGATE opcode (0x4f). This fails the minimal push rule of BIP 62 and makes the result non-standard.

This is a backport of core#17204

Test Plan

ninja all check-all

Event Timeline

PiRK requested review of this revision.Thu, Sep 9, 13:17
PiRK planned changes to this revision.Thu, Sep 9, 16:36

Needs more investigation to make sure it fits with our codebase