Make GetSerializeSize a wrapper on top of CSizeComputer
commit657e05ab2e87ff725723fe8a375fc3f8aad02126
authorPieter Wuille <pieter.wuille@gmail.com>
Fri, 28 Oct 2016 23:51:33 +0000 (28 16:51 -0700)
committerPieter Wuille <pieter.wuille@gmail.com>
Mon, 7 Nov 2016 21:56:22 +0000 (7 13:56 -0800)
treee20cebbde1dee31d6d21dccdaa2223a5ca1566e3
parentfad9b66504f176ed3624515f3bf4d428cf687607
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.
14 files changed:
src/addrman.h
src/blockencodings.cpp
src/coins.h
src/compressor.h
src/dbwrapper.h
src/main.cpp
src/primitives/transaction.h
src/pubkey.h
src/script/bitcoinconsensus.cpp
src/serialize.h
src/streams.h
src/test/uint256_tests.cpp
src/uint256.h
src/undo.h