How does a new block broadcast?

0

In a bitcoin network, when a miner discovers a new block, he needs to broadcast to other nodes, whether he broadcasts to only the nodes that have established 8 TCP connections or if he can broadcast the new block through the other 1024 nodes that actively connect to it?I hope get the result according to code and tell me which code file I should analysis

and zhao

Posted 2018-11-24T08:11:11.063

Reputation: 1

Answers

0

The number of peers connected to your node is configurable. You can increase it from 8. Your node will broadcast to the connected peers, who, in turn, will broadcast to their connected peers.

user1202278

Posted 2018-11-24T08:11:11.063

Reputation: 109

For each node, up to 8 nodes can be actively connected and 117 foreign connections can be accepted. So is the broadcast block broadcast to 125 nodes or just to the actively established nodes?and zhao 2018-11-25T12:54:22.513

You can configure inbound, outbound and permanent connections for your node. I am not sure what 117 refers to, inbound? Outbound connections are also foreign as their addresses are discovered on the network(not permanent). In any case, you can set the limits there. All connections are treated equally in respect to broadcasting, propagating of chain-extending blocks.James C. 2018-11-30T07:58:28.857