aboutsummaryrefslogtreecommitdiff
path: root/src/netaddress.h
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-07-28 19:52:14 +0200
committerMarcoFalke <falke.marco@gmail.com>2021-07-30 11:24:41 +0200
commitfa4e6afdae7b82df638b60edf37ac36d57a8cb4f (patch)
tree716dcf16ea1a32b2d1ce70199752b5bedfe64140 /src/netaddress.h
parentfa384fdd0b7af73d81fa9619c5fba779452cd2af (diff)
Remove unused CSubNet serialize code
Diffstat (limited to 'src/netaddress.h')
-rw-r--r--src/netaddress.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/netaddress.h b/src/netaddress.h
index 5e1d9d2a6f..c81f9fd5d8 100644
--- a/src/netaddress.h
+++ b/src/netaddress.h
@@ -536,24 +536,6 @@ class CSubNet
friend bool operator==(const CSubNet& a, const CSubNet& b);
friend bool operator!=(const CSubNet& a, const CSubNet& b) { return !(a == b); }
friend bool operator<(const CSubNet& a, const CSubNet& b);
-
- SERIALIZE_METHODS(CSubNet, obj)
- {
- READWRITE(obj.network);
- if (obj.network.IsIPv4()) {
- // Before commit 102867c587f5f7954232fb8ed8e85cda78bb4d32, CSubNet used the last 4 bytes of netmask
- // to store the relevant bytes for an IPv4 mask. For compatibility reasons, keep doing so in
- // serialized form.
- unsigned char dummy[12] = {0};
- READWRITE(dummy);
- READWRITE(MakeSpan(obj.netmask).first(4));
- } else {
- READWRITE(obj.netmask);
- }
- READWRITE(obj.valid);
- // Mark invalid if the result doesn't pass sanity checking.
- SER_READ(obj, if (obj.valid) obj.valid = obj.SanityCheck());
- }
};
/** A combination of a network address (CNetAddr) and a (TCP) port */