test: fix, restore and improve cnetaddr scoped id documentation #21961

pull jonatack wants to merge 2 commits into bitcoin:master from jonatack:fix-and-improve-cnetaddr-scoped-id-test-documentation changing 1 files +5 −1
  1. jonatack commented at 10:26 AM on May 16, 2021: contributor
    • removes documentation that was orphaned by #21689
    • restores documentation removed by #21689 and improves it with information proposed in #21690, which also tested it
  2. test: remove comment orphaned by commit 63631be d072e93eaa
  3. test: add scoped id information/context from commit 6ab76c0 dbd1dc1fad
  4. fanquake added the label Tests on May 16, 2021
  5. jonatack cross-referenced this on May 17, 2021 from issue test: Remove intermittently failing and not very meaningful `BOOST_CHECK` in `cnetaddr_basic` by practicalswift
  6. in src/test/net_tests.cpp:309 in dbd1dc1fad
     305 | +    // zone id, for example, given a link-local address of "fe80::1" and a zone
     306 | +    // id of "32", return the address as "fe80::1%32". An exception is macOS,
     307 | +    // which does not support scoped ids and instead returns the address in a
     308 | +    // different format as "fe80:0:0:0:0:0:0:1" without the zone id.
     309 |      const std::string link_local{"fe80::1"};
     310 |      const std::string scoped_addr{link_local + "%32"};
    


    laanwj commented at 2:09 PM on May 17, 2021:

    I don't really know this code but isn't the "e.g. 32" comment still relevant to this line?


    jonatack commented at 2:18 PM on May 17, 2021:

    Thanks. I don't think so, since #21689 removed the test it referred to. And now since the merge of #21756 today, the rest is out of date too because we no longer return zone ids (discussion in issue #21982).

  7. jonatack closed this on May 17, 2021

  8. jonatack commented at 2:27 PM on May 17, 2021: contributor

    Closing as we no longer return any scoped ids. There is still a line of orphaned documentation but probably no one will notice.

  9. laanwj cross-referenced this on May 17, 2021 from issue net: Return IPv6 scope id in `CNetAddr::ToStringIP()` by laanwj
  10. laanwj referenced this in commit 2fc111b6e3 on May 19, 2021
  11. sidhujag referenced this in commit b2255c1f29 on May 19, 2021
  12. bitcoin locked this on Aug 16, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:54 UTC