aboutsummaryrefslogtreecommitdiff
path: root/src/index/blockfilterindex.cpp
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2020-03-11 09:35:50 -0700
committerPieter Wuille <pieter@wuille.net>2020-03-30 16:10:30 -0700
commit4eb5643e3538863c9d2ff261f49a9a1b248de243 (patch)
tree377437ffee20c67fa7e0611c31be6b2490a4483c /src/index/blockfilterindex.cpp
parent2b1f85e8c52c8bc5a17eae4c809eaf61d724af98 (diff)
downloadbitcoin-4eb5643e3538863c9d2ff261f49a9a1b248de243.tar.xz
Convert everything except wallet/qt to new serialization
Diffstat (limited to 'src/index/blockfilterindex.cpp')
-rw-r--r--src/index/blockfilterindex.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/index/blockfilterindex.cpp b/src/index/blockfilterindex.cpp
index c3ce8d7af0..f2c3d66ebd 100644
--- a/src/index/blockfilterindex.cpp
+++ b/src/index/blockfilterindex.cpp
@@ -39,14 +39,7 @@ struct DBVal {
uint256 header;
FlatFilePos pos;
- ADD_SERIALIZE_METHODS;
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action) {
- READWRITE(hash);
- READWRITE(header);
- READWRITE(pos);
- }
+ SERIALIZE_METHODS(DBVal, obj) { READWRITE(obj.hash, obj.header, obj.pos); }
};
struct DBHeightKey {
@@ -78,17 +71,14 @@ struct DBHashKey {
explicit DBHashKey(const uint256& hash_in) : hash(hash_in) {}
- ADD_SERIALIZE_METHODS;
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action) {
+ SERIALIZE_METHODS(DBHashKey, obj) {
char prefix = DB_BLOCK_HASH;
READWRITE(prefix);
if (prefix != DB_BLOCK_HASH) {
throw std::ios_base::failure("Invalid format for block filter index DB hash key");
}
- READWRITE(hash);
+ READWRITE(obj.hash);
}
};