aboutsummaryrefslogtreecommitdiff
path: root/src/test/fuzz/decode_tx.cpp
diff options
context:
space:
mode:
authorVasil Dimov <vd@FreeBSD.org>2020-11-02 11:36:29 +0100
committerVasil Dimov <vd@FreeBSD.org>2020-11-11 16:05:15 +0100
commit38ada892ed0ed9aaa46b1791db12a371a3c0c419 (patch)
tree873d00ac62228833700af497839f2a65698f5653 /src/test/fuzz/decode_tx.cpp
parent867dbeba5f91be15ca0d4a7303a71957ff9a37ad (diff)
addrman: ensure old versions don't parse peers.dat
Even though the format of `peers.dat` was changed in an incompatible way (old software versions <0.21 cannot understand the new file format), it is not guaranteed that old versions will fail to parse it. There is a chance that old versions parse its contents as garbage and use it. Old versions expect the "key size" field to be 32 and fail the parsing if it is not. Thus, we put something other than 32 in it. This will make versions between 0.11.0 and 0.20.1 deterministically fail on the new format. Versions prior to https://github.com/bitcoin/bitcoin/pull/5941 (<0.11.0) will still parse it as garbage. Also, introduce a way to increment the `peers.dat` format in a way that does not necessary make older versions refuse to read it.
Diffstat (limited to 'src/test/fuzz/decode_tx.cpp')
0 files changed, 0 insertions, 0 deletions