It's not clear to me if dropping support for this functionality was intentional.

Chain of events:

- #21689 removed test coverage due to a misunderstanding due, I believe, to this functionality being generally supported by all platforms except macOS which does not and returns a different format
- #21756 removed support and caused this regression
- #21690 restores the test coverage that would have caught this regression

Currently, neither the test coverage before #21689 nor the coverage restored by #21690 pass since the merge of #21756.

{
    CNetAddr addr;
    CDataStream s(SER_NETWORK, PROTOCOL_VERSION);
    
    
    s.SetVersion(s.GetVersion() | ADDRV2_FORMAT);
    s << addr;
    BOOST_CHECK_EQUAL(HexStr(s), "021000000000000000000000000000000000");
    s.clear();
    BOOST_REQUIRE(LookupHost("1.2.3.4", addr, false));
    s << addr;
    BOOST_CHECK_EQUAL(HexStr(s), "010401020304");
    s.clear();
    BOOST_REQUIRE(LookupHost("1a1b:2a2b:3a3b:4a4b:5a5b:6a6b:7a7b:8a8b", addr, false));
    s << addr;
    BOOST_CHECK_EQUAL(HexStr(s), "02101a1b2a2b3a3b4a4b5a5b6a6b7a7b8a8b");
    s.clear();
    BOOST_REQUIRE(addr.SetSpecial("6hzph5hv6337r6p2.onion"));
    s << addr;
    BOOST_CHECK_EQUAL(HexStr(s), "030af1f2f3f4f5f6f7f8f9fa");