> We should allocate memory for addrKnown filter only for those peers which are expected to participate in address relay.
>
> Currently, we do it for all peers (including SPV and block-relay-only), which results in extra RAM where it's not needed.
>
> Upd:
> In future, we would still allow SPVs to ask for addrs, so allocation still will be done by default.
> However, they will be able to opt-out via this proposal and then we could save some more memory.
> This PR still saves memory for block-relay-only peers immediately after merging.
This is a backport of Core PR17164 [1/3]
https://github.com/bitcoin/bitcoin/pull/17164/commits/090b75c14be6b9ba2efe38a17d141c6e6af575cb