See https://github.com/bitcoin/bitcoin/pull/22762#issuecomment-951063826

This can be fixed by creating a new exception type and catching it in the right place.

#### Useful skills:

* C++ exceptions
* Addrman serialization
* Functional tests

#### Want to work on this issue?

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.

#ifndef BITCOIN_ADDRMAN_H
#define BITCOIN_ADDRMAN_H
#include <netaddress.h>
#include <protocol.h>
#include <streams.h>
#include <timedata.h>
#include <cstdint>
#include <memory>
#include <optional>
#include <utility>
#include <vector>
class AddrManImpl;