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

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.

  • 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 Nov 25 '18 at 12:54
  • 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. Nov 30 '18 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.