Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: TierNolan on January 08, 2014, 01:29:14 PM



Title: Address forwarding
Post by: TierNolan on January 08, 2014, 01:29:14 PM
I was looking at the "addr" message forwarding rules (https://github.com/bitcoin/bitcoin/blob/master/src/main.cpp#L3250).

The rule is to randomly select one (or 2) nodes and send them the addr messages.

All peers are sorted based on a deterministic algorithm.  This seed for this sort is changed once a day.  Sort order of the peers is different for each address.

If peers are constant, then the same address will be forwarded to the same peer every time.

However, it only sends the address to 2 peers.  If the address is not reachable, it only sends it to 1.

Is this a security thing?  Eventually if each node sends the address to 2 other nodes, won't it flood fill the network anyway?