diff options
author | Jon Atack <jon@atack.com> | 2021-08-30 12:11:47 +0200 |
---|---|---|
committer | Jon Atack <jon@atack.com> | 2021-09-15 16:38:03 +0200 |
commit | cdaab90662a54e331de0e49a89596bbb94a8ac45 (patch) | |
tree | f22e4783df286743470e34ab6b22a256ef1d033f /test/functional/feature_versionbits_warning.py | |
parent | 869f136816c6900ce84bc4b5a9c93c0deab85193 (diff) |
Add test for addrman consistency check on restart with asmap
PR #22697 introduced a reproducible issue in commit 181a1207 that causes the
addrman tried table to fail consistency checks and significantly lose peer
entries when the `-asmap` configuration option is used.
The issue occurs on bitcoind restart due to an initialization order change
in `src/init.cpp` in that commit whereby CAddrman asmap is set after
deserializing `peers.dat`, rather than before.
Issue reported on the `#bitcoin-core-dev` IRC channel starting at
https://www.erisian.com.au/bitcoin-core-dev/log-2021-08-23.html#l-263.
```
addrman lost 22813 new and 2 tried addresses due to collisions or invalid addresses
ADDRMAN CONSISTENCY CHECK FAILED!!! err=-17
bitcoind: ./addrman.h:707: void CAddrMan::Check() const: Assertion `false' failed. Aborted
```
How to reproduce:
- `git checkout 181a1207` and recompile
- launch bitcoind with `-asmap` and `-checkaddrman=1` config options
- restart bitcoind
- bitcoind aborts on second call to `CAddrMan::Check()`
This commit adds a regression test to reproduce the case; it passes or fails
with the same error.
Co-authored-by: John Newbery <john@johnnewbery.com>
Co-authored-by: Martin Zumsande <mzumsande@gmail.com>
Diffstat (limited to 'test/functional/feature_versionbits_warning.py')
0 files changed, 0 insertions, 0 deletions