HomePhabricator

Add FORMATTER_METHODS, similar to SERIALIZE_METHODS, but for formatters

Description

Add FORMATTER_METHODS, similar to SERIALIZE_METHODS, but for formatters

Summary:
PR description:

This is the next piece of the puzzle from #10785. It includes:

The FORMATTER_METHODS macro, similar to SERIALIZE_METHODS, for defining a formatter with a unified serialization/deserialization implementation.
Updating compression.h to consist of 3 formatters, rather than old-style wrappers (ScriptCompression, AmountCompression, TxOutCompression).

This is a backport of Core PR17957 [1/2]
https://github.com/bitcoin/bitcoin/pull/17957/commits/ca34c5cba5fbb9b046b074a234f06ecf6ed5d610

Depends on D8629

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Jan 18 2020, 15:32
PiRKCommitted on Dec 8 2020, 19:40
PiRKPushed on Dec 8 2020, 19:40
Reviewer
Restricted Project
Differential Revision
D8631: Add FORMATTER_METHODS, similar to SERIALIZE_METHODS, but for formatters
Parents
rABC0b536d79fbb7: Convert chain and blockfileinfo to new serialization
Branches
Unknown
Tags
Unknown