aboutsummaryrefslogtreecommitdiff
path: root/src/addrman.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2017-07-07 16:08:51 -0700
committerPieter Wuille <pieter.wuille@gmail.com>2020-01-02 11:05:36 -0800
commit9250a087d2f450f37342010aea0a5d583eea508b (patch)
tree3caf5829ecc4574d356cd9d30504df491fb2fb87 /src/addrman.h
parentca33451535dc29f64d37c49af8b22142d7716d0d (diff)
downloadbitcoin-9250a087d2f450f37342010aea0a5d583eea508b.tar.xz
Convert addrdb/addrman to new serialization
Diffstat (limited to 'src/addrman.h')
-rw-r--r--src/addrman.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/addrman.h b/src/addrman.h
index ee404f6939..c001d59da5 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -53,14 +53,10 @@ private:
public:
- ADD_SERIALIZE_METHODS;
-
- template <typename Stream, typename Operation>
- inline void SerializationOp(Stream& s, Operation ser_action) {
- READWRITEAS(CAddress, *this);
- READWRITE(source);
- READWRITE(nLastSuccess);
- READWRITE(nAttempts);
+ SERIALIZE_METHODS(CAddrInfo, obj)
+ {
+ READWRITEAS(CAddress, obj);
+ READWRITE(obj.source, obj.nLastSuccess, obj.nAttempts);
}
CAddrInfo(const CAddress &addrIn, const CNetAddr &addrSource) : CAddress(addrIn), source(addrSource)
@@ -294,7 +290,7 @@ public:
* This format is more complex, but significantly smaller (at most 1.5 MiB), and supports
* changes to the ADDRMAN_ parameters without breaking the on-disk structure.
*
- * We don't use ADD_SERIALIZE_METHODS since the serialization and deserialization code has
+ * We don't use SERIALIZE_METHODS since the serialization and deserialization code has
* very little in common.
*/
template<typename Stream>