美文网首页
阅读比特币源码中的疑问:-connect和-addnode区别

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

作者: 浅色记忆_6886 | 来源:发表于2020-02-25 14:54 被阅读0次

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.
#######################################################
请问区别具体体现在源码什么地方,求解答

相关文章

网友评论

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

      本文链接:https://www.haomeiwen.com/subject/kkrtchtx.html