aboutsummaryrefslogtreecommitdiff
path: root/src/addrman_impl.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter@wuille.net>2021-10-25 11:09:30 -0400
committerPieter Wuille <pieter@wuille.net>2021-10-25 13:48:21 -0400
commitd891ae768185b464cae476c16c74c365372d4a3c (patch)
treed37fbeef2d4c45d68fc24e996e91d765a9ad5451 /src/addrman_impl.h
parent22a90186496aea8025316bc5616905ffcf1aeb29 (diff)
Introduce new V4 format addrman
92617b7a758c0425330fba4b886296730567927c effectively changed the on-disk format in an incompatible way: old deserializers cannot deal with multiple entries for the same IP. Introduce a V4_MULTIPORT format, and increment the compatibility base, so that old versions correctly recognize it as an incompatible future version.
Diffstat (limited to 'src/addrman_impl.h')
-rw-r--r--src/addrman_impl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/addrman_impl.h b/src/addrman_impl.h
index f8191d6b85..e8e7c15a19 100644
--- a/src/addrman_impl.h
+++ b/src/addrman_impl.h
@@ -157,6 +157,7 @@ private:
V1_DETERMINISTIC = 1, //!< for pre-asmap files
V2_ASMAP = 2, //!< for files including asmap version
V3_BIP155 = 3, //!< same as V2_ASMAP plus addresses are in BIP155 format
+ V4_MULTIPORT = 4, //!< adds support for multiple ports per IP
};
//! The maximum format this software knows it can unserialize. Also, we always serialize
@@ -164,7 +165,7 @@ private:
//! The format (first byte in the serialized stream) can be higher than this and
//! still this software may be able to unserialize the file - if the second byte
//! (see `lowest_compatible` in `Unserialize()`) is less or equal to this.
- static constexpr Format FILE_FORMAT = Format::V3_BIP155;
+ static constexpr Format FILE_FORMAT = Format::V4_MULTIPORT;
//! The initial value of a field that is incremented every time an incompatible format
//! change is made (such that old software versions would not be able to parse and