HomePhabricator

Add function to trim leading array zeros maintaining MSB.

Description

Add function to trim leading array zeros maintaining MSB.

Summary:
Add a function MinimalizeBigEndianArray to trim a byte array
of leading zeros, while maintaining any MSB for negation. This
will get used in BIN2NUM in a later patch.

Co-authored-by: Shammah Chancellor <shammah.chancellor@gmail.com>

Test Plan: make check

Reviewers: shadders, movrcx, #bitcoin_abc, schancel, deadalnix

Reviewed By: #bitcoin_abc, schancel

Subscribers: teamcity

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

Details

Provenance
jasonbcoxAuthored on Mar 18 2018, 20:29
jasonbcoxPushed on Mar 18 2018, 20:44
Reviewer
Restricted Project
Differential Revision
D1215: Add function to trim leading array zeros maintaining MSB.
Parents
rABC2b3932f10d03: Pull minimal check out of CScriptNum constr. into IsMinimalArray
Branches
Unknown
Tags
Unknown