Avoid advertising the node's address when it is not listening or IsInitialBlockDownload(). #792

pull gmaxwell wants to merge 1 commits into bitcoin:master from gmaxwell:advertise-fixes changing 2 files +8 −6
  1. gmaxwell commented at 11:23 PM on February 1, 2012: contributor

    This also avoids flushing setAddrKnown until 24 hours has passed, and avoids contacting the external IP services when not listening.

    Advertising non-listening nodes is just addr message spam. It doesn't help the network, in fact it hurts the network, and it also hurts user's privacy.

    Advertising far out of sync nodes doesn't help the network— they can't even forward (most) transactions and wastes nodes outbound slots.

  2. Avoid advertising the node's address when it is not listening or IsInitialBlockDownload().
    This also avoids flushing setAddrKnown until 24 hours has passed,
    and avoids contacting the external IP services when not listening.
    
    Advertising non-listening nodes is just addr message spam.
    It doesn't help the network, in fact it hurts the network,
    and it also hurts user's privacy.
    
    Advertising far out of sync nodes doesn't help the network—
    they can't even forward (most) transactions and wastes nodes
    outbound slots.
    5d1b8f1725
  3. gmaxwell commented at 11:24 PM on February 1, 2012: contributor

    This is a fairly minimal change for sane behavior. I think we also should check that our listening is working before advertising and that we shouldn't advertise when we're completely full, but the first requires a fair amount of additional code and the second requires careful consideration.

  4. jgarzik commented at 3:11 AM on February 2, 2012: contributor

    ACK

  5. TheBlueMatt commented at 6:33 PM on February 2, 2012: member

    ACK

  6. gavinandresen commented at 9:08 PM on February 3, 2012: contributor

    ACK, sanity tested with/without -nolisten.

  7. gavinandresen merged this on Feb 3, 2012
  8. gavinandresen closed this on Feb 3, 2012

  9. ptschip referenced this in commit 54a64addcd on Oct 13, 2017
  10. lateminer referenced this in commit c12697469b on Feb 22, 2019
  11. DrahtBot locked this on Sep 8, 2021

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-04-18 21:16 UTC

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