aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Newbery <john@johnnewbery.com>2021-01-29 10:18:31 +0000
committerJohn Newbery <john@johnnewbery.com>2021-01-29 12:39:55 +0000
commit436292367c1d737cf73bd985293539500d1206f5 (patch)
treed165925c1d0cb01bfff34c9a9e9fdbd79831a409
parentac3547eddd8a7d67b4103508f30d5d02a9c1f148 (diff)
[addrman] Improve serialization comments
Thanks to Vasil Dimov <vd@FreeBSD.org> for these suggestions
-rw-r--r--src/addrman.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/addrman.h b/src/addrman.h
index cde864f259..9ca0a989c0 100644
--- a/src/addrman.h
+++ b/src/addrman.h
@@ -335,23 +335,20 @@ public:
* * nNew
* * nTried
* * number of "new" buckets XOR 2**30
- * * all nNew addrinfos in vvNew
- * * all nTried addrinfos in vvTried
- * * for each bucket:
+ * * all new addresses (total count: nNew)
+ * * all tried addresses (total count: nTried)
+ * * for each new bucket:
* * number of elements
- * * for each element: index
+ * * for each element: index in the serialized "all new addresses"
* * asmap checksum
*
* 2**30 is xorred with the number of buckets to make addrman deserializer v0 detect it
* as incompatible. This is necessary because it did not check the version number on
* deserialization.
*
- * Notice that vvTried, mapAddr and vVector are never encoded explicitly;
+ * vvNew, vvTried, mapInfo, mapAddr and vRandom are never encoded explicitly;
* they are instead reconstructed from the other information.
*
- * vvNew is serialized, but only used if ADDRMAN_NEW_BUCKET_COUNT and the asmap checksum
- * didn't change, otherwise it is reconstructed as well.
- *
* 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.
*