HomePhabricator

libconsensus: Add input validation of flags

Description

libconsensus: Add input validation of flags

Makes it an error to use flags that have not been defined
on the libconsensus API.

There has been some confusion as to what pass to libconsensus, and
(combined with mention in the release notes) this should clear it up.

Using undocumented flags is a risk because their meaning,
and what combinations are allowed, changes from release to release.
E.g. it is no longer possible to pass (CLEANSTACK | P2SH) without
running into an assertion after the segwit changes.

Details

Provenance
Wladimir J. van der Laan <laanwj@gmail.com>Authored on Oct 20 2016, 06:30
deadalnixPushed on May 14 2017, 22:04
Parents
rABCc5875773561c: Merge #8928: Fix init segfault where InitLoadWallet() calls ATMP before genesis
Branches
Unknown
Tags
Unknown

Event Timeline

Wladimir J. van der Laan <laanwj@gmail.com> committed rABC5ca8ef299a08: libconsensus: Add input validation of flags (authored by Wladimir J. van der Laan <laanwj@gmail.com>).Oct 20 2016, 17:26