HomePhabricator

Add native support for serializing char arrays without FLATDATA

Description

Add native support for serializing char arrays without FLATDATA

Summary:
Support is added to serialize arrays of type char or unsigned char directly,
without any wrappers. All invocations of the FLATDATA wrappers that are
obsoleted by this are removed.

This includes a patch by Russell Yanofsky to make char casting type safe.

The serialization of CSubNet is changed to serialize a bool directly rather
than though FLATDATA. This makes the serialization independent of the size
of the bool type (and will use 1 byte everywhere).

This is backport of Core PR12740

Test Plan:

ninja check-all

Also cross compile on arm and aarch64 as they tend to do weird things with char.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Mar 21 2018, 00:37
deadalnixCommitted on Oct 3 2019, 15:35
deadalnixPushed on Oct 3 2019, 15:47
Reviewer
Restricted Project
Differential Revision
D4188: Add native support for serializing char arrays without FLATDATA
Parents
rSTAGING5822a6e6efca: refactor: Avoid locking tx pool cs thrice
Branches
Unknown
Tags
Unknown
References
tag: phabricator/base/13339