Commit Graph

7 Commits

Author SHA1 Message Date
Pieter Wuille
d891ae7681 Introduce new V4 format addrman
92617b7a75 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.
2021-10-25 13:48:21 -04:00
Amiti Uttarwar
dd8f7f2500 scripted-diff: Rename CAddrMan to AddrMan
-BEGIN VERIFY SCRIPT-
git grep -l CAddrMan src/ test/ | xargs sed -i 's/CAddrMan/AddrMan/g'
-END VERIFY SCRIPT-
2021-09-28 22:21:10 -04:00
MarcoFalke
fa01f22e6e
test: Add missing re.escape() to feature_addrman test 2021-09-27 09:52:41 +02:00
MarcoFalke
fa7a883f5a
addrman: Replace assert with throw on corrupt data
Assert should only be used for program internal logic errors, not to
sanitize external user input.
2021-09-21 10:09:45 +02:00
MarcoFalke
faa81f9486
test: Add addrman deserialization error tests 2021-09-20 09:07:44 +02:00
MarcoFalke
fa55c3dc1b
Raise InitError when peers.dat is invalid or corrupted 2021-09-09 09:20:43 +02:00
MarcoFalke
fab0b55cf0
addrman: Fix format string in deserialize error
Also add a regression test.
2021-09-05 10:26:03 +02:00