rpc: clarify that `getaddrmaninfo` counts unique addresses #36310

pull 0xB10C wants to merge 1 commits into bitcoin:master from 0xB10C:2026-09-getaddrmaninfo-unique changing 1 files +4 −3
  1. 0xB10C commented at 6:51 PM on September 21, 2026: contributor

    While using the getaddrmaninfo RPC for monitoring the sizes of my address managers, we noticed that it returns the count of unique addresses in the tables. While the addresses in the tried table are always unique, the new table might contain an address multiple times if we received it from sources in different network groups. I incorrectly assumed the returned values to be the number of address manager slots filled. To make this clearer for the next person, I'm clarifying this in the documentation.

    The number of filled addrman slots can be derived from the output of the hidden getrawaddrman RPC.

  2. rpc: clarify that getaddrmaninfo counts unique addresses
    While using the `getaddrmaninfo` RPC for monitoring the sizes of my
    address managers, I noticed that it returns the count of unique
    addresses in the tables. While the addresses in the `tried` table
    are always unique, the `new` table might contain an address multiple
    times if we received it from sources in different network groups.
    I incorrectly assumed the returned values to be the number of address
    manager slots filled. To make this clearer for the next person, I'm
    clarifying this in the documentation.
    
    The number of filled addrman slots can be derived from the output of
    the hidden `getrawaddrman` RPC.
    0d34b6e928
  3. DrahtBot added the label RPC/REST/ZMQ on Sep 21, 2026
  4. DrahtBot commented at 6:51 PM on September 21, 2026: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/36310.

    <!--021abf342d371248e50ceaed478a90ca-->

    Reviews

    See the guideline and AI policy for information on the review process.

    Type Reviewers
    ACK stratospher, danielabrozzoni, fjahr

    If your review is incorrectly listed, please copy-paste <code>&lt;!--meta-tag:bot-skip--&gt;</code> into the comment that the bot should ignore.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  5. stratospher approved
  6. stratospher commented at 6:56 PM on September 21, 2026: contributor

    ACK 0d34b6e.

  7. 0xB10C commented at 7:11 PM on September 21, 2026: contributor

    Maybe as additional information for reviewers: It returns unique addresses, as we call addrman.Size(..), which calls Size_(..), which looks at vRandom, which is deduplicated.

  8. danielabrozzoni approved
  9. danielabrozzoni commented at 9:46 PM on September 21, 2026: member

    Uhh I had no idea! Thanks for pointing this out :)

    ACK 0d34b6e9287f523adf1c85a05ada2ba21f0d820c

  10. fjahr commented at 7:15 AM on September 22, 2026: contributor

    ACK 0d34b6e9287f523adf1c85a05ada2ba21f0d820c

  11. sedited merged this on Sep 22, 2026
  12. sedited closed this on Sep 22, 2026

  13. 0xB10C deleted the branch on Sep 22, 2026

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-09-24 10:51 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me