Page MenuHomePhabricator

Convert CCompactSize to proper formatter
ClosedPublic

Authored by PiRK on Jan 5 2021, 12:49.

Details

Reviewers
deadalnix
Group Reviewers
Restricted Project
Commits
rABC7c7cbd48c136: Convert CCompactSize to proper formatter
Summary

Serialization improvements step 5 (blockencodings)

This PR is probably the most involved change in the sequence of changes extracted from #10785.

In order to implement the differential encoding of BIP152, this change changes VectorFormatter to permit a stateful sub-formatter, which is then used by DifferenceFormatter. A CustomUintFormatter is added as well to do the 48-bit serialization of short ids.

This is a backport of Core PR18112 [1/5]
https://github.com/bitcoin/bitcoin/pull/18112/commits/3ca574cef0b4423f21b2c3efd8f5c9f71d52f219

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable