阅读比特币源码中的疑问:-connect和-addnode区别

bitcoin.conf中提及connect和addnode区别如下:
##############################################################
Quick Primer on addnode vs connect
Let’s say for instance you use addnode=4.2.2.4
addnode will connect you to and tell you about the
nodes connected to 4.2.2.4. In addition it will tell
the other nodes connected to it that you exist so
they can connect to you.
connect will not do the above when you ‘connect’ to it.
It will only connect you to 4.2.2.4 and no one else.

So if you’re behind a firewall, or have other problems
finding nodes, add some using ‘addnode’.

If you want to stay private, use ‘connect’ to only
connect to “trusted” nodes.

If you run multiple nodes on a LAN, there’s no need for
all of them to open lots of connections. Instead
‘connect’ them all to one node that is port forwarded
and has lots of connections.
Thanks goes to [Noodle] on Freenode.
##############################################################
请问区别具体体现在源码什么地方,求解答

发布了1 篇原创文章 · 获赞 0 · 访问量 11

猜你喜欢

转载自blog.csdn.net/qq_19814347/article/details/104497301