Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Nicolas Dorier on April 20, 2014, 04:36:00 PM



Title: GetMyExternalIP() why, and what happens if down ?
Post by: Nicolas Dorier on April 20, 2014, 04:36:00 PM
I see that GetMyExternalIp() is hard coded to query www.showmyip.com and checkip.dyndns.org to get the IP of the bitcoin node.

Now there is two things I don't understand :

Why doing that ?
A recieving Bitcoin node could easily use the IP packet to get the IP of the sender, instead of that, it seems to rely on the addr_from of the Version message payload.

And what happens if both showmyip and checkip dyndns are down ? (At my home showmyip does not work)
Does most of the miners will be unable to communicate leading to a bitcoin apocalypse ?

Second, out of topic, how can I remove this ******* time limit that say I can't post on this forum because I already did it just before altough it is not true.


Title: Re: GetMyExternalIP() why, and what happens if down ?
Post by: tholenst on April 20, 2014, 05:59:15 PM
See https://github.com/bitcoin/bitcoin/pull/3461 and https://github.com/bitcoin/bitcoin/pull/3088 for work on changing this.


Title: Re: GetMyExternalIP() why, and what happens if down ?
Post by: gmaxwell on April 20, 2014, 08:04:12 PM
Very little happens at all if it doesn't work. It's only used for hosts which are behind nat, which don't use UPNP to learn their address, and which don't have a manually configured address. These addresses are only used for announcing to other peers what addresses they can connect to.