HomePhabricator

Make GetSerializeSize a wrapper on top of CSizeComputer

Description

Make GetSerializeSize a wrapper on top of CSizeComputer

Given that in default GetSerializeSize implementations created by
ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid
of the specialized GetSerializeSize methods everywhere, and just use
CSizeComputer. This removes a lot of code which isn't actually used
anywhere.

For CCompactSize and CVarInt this actually removes a more efficient
size computing algorithm, which is brought back in a later commit.

Details

Provenance
Pieter Wuille <pieter.wuille@gmail.com>Authored on Oct 28 2016, 23:51
deadalnixPushed on May 14 2017, 22:04
Parents
rABCfad9b66504f1: Make nType and nVersion private and sometimes const
Branches
Unknown
Tags
Unknown

Event Timeline

Pieter Wuille <pieter.wuille@gmail.com> committed rABC657e05ab2e87: Make GetSerializeSize a wrapper on top of CSizeComputer (authored by Pieter Wuille <pieter.wuille@gmail.com>).Nov 7 2016, 21:56