Get rid of nType and nVersion
commit528472111b4965b1a99c4bcf08ac5ec93d87f10f
authorPieter Wuille <pieter.wuille@gmail.com>
Fri, 28 Oct 2016 23:29:17 +0000 (28 16:29 -0700)
committerPieter Wuille <pieter.wuille@gmail.com>
Mon, 7 Nov 2016 21:56:27 +0000 (7 13:56 -0800)
tree2daf6bc17f8c26083d6597ad8632aa7cf2eef7ef
parent657e05ab2e87ff725723fe8a375fc3f8aad02126
Get rid of nType and nVersion

Remove the nType and nVersion as parameters to all serialization methods
and functions. There is only one place where it's read and has an impact
(in CAddress), and even there it does not impact any of the recursively
invoked serializers.

Instead, the few places that need nType or nVersion are changed to read
it directly from the stream object, through GetType() and GetVersion()
methods which are added to all stream classes.
36 files changed:
src/addrdb.h
src/addrman.h
src/amount.h
src/blockencodings.h
src/bloom.h
src/chain.h
src/coins.h
src/compressor.h
src/hash.h
src/key.h
src/merkleblock.h
src/net.h
src/netaddress.h
src/primitives/block.h
src/primitives/transaction.h
src/protocol.h
src/pubkey.h
src/qt/recentrequeststablemodel.h
src/qt/walletmodel.h
src/rest.cpp
src/script/bitcoinconsensus.cpp
src/script/interpreter.cpp
src/serialize.h
src/streams.h
src/test/blockencodings_tests.cpp
src/test/bloom_tests.cpp
src/test/dbwrapper_tests.cpp
src/test/net_tests.cpp
src/test/serialize_tests.cpp
src/test/uint256_tests.cpp
src/txdb.h
src/uint256.h
src/undo.h
src/wallet/crypter.h
src/wallet/wallet.h
src/wallet/walletdb.h