Avoid advertising the node's address when it is not listening or IsInitialBlockDownlo...
authorGregory Maxwell <greg@xiph.org>
Wed, 1 Feb 2012 23:08:03 +0000 (18:08 -0500)
committerGregory Maxwell <greg@xiph.org>
Wed, 1 Feb 2012 23:08:03 +0000 (18:08 -0500)
commit5d1b8f1725f5c65a170feb44d182f9016caa9709
tree921eb8d680b726cf4e5f87824470a85f2a5cc355
parentd2291cce9235708f3bc3f95ac1b45164a03cd2ce
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.
src/main.cpp
src/net.cpp