aboutsummaryrefslogtreecommitdiff
path: root/src/test/serialize_tests.cpp
diff options
context:
space:
mode:
authorPieter Wuille <[email protected]>2016-10-28 16:29:17 -0700
committerPieter Wuille <[email protected]>2016-11-07 13:56:27 -0800
commit528472111b4965b1a99c4bcf08ac5ec93d87f10f (patch)
tree2daf6bc17f8c26083d6597ad8632aa7cf2eef7ef /src/test/serialize_tests.cpp
parentMake GetSerializeSize a wrapper on top of CSizeComputer (diff)
downloaddiscoin-528472111b4965b1a99c4bcf08ac5ec93d87f10f.tar.xz
discoin-528472111b4965b1a99c4bcf08ac5ec93d87f10f.zip
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.
Diffstat (limited to 'src/test/serialize_tests.cpp')
-rw-r--r--src/test/serialize_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp
index 4c0fdc77f..bbadf5795 100644
--- a/src/test/serialize_tests.cpp
+++ b/src/test/serialize_tests.cpp
@@ -28,7 +28,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITE(intval);
READWRITE(boolval);
READWRITE(stringval);
@@ -53,7 +53,7 @@ public:
ADD_SERIALIZE_METHODS;
template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action, int nType, int nVersion) {
+ inline void SerializationOp(Stream& s, Operation ser_action) {
READWRITEMANY(intval, boolval, stringval, FLATDATA(charstrval), txval);
}
};