Which peers does a node broadcast a new block to? In the Bitcoin network, when a miner discovers a new block, he needs to broadcast it to other nodes. Does the node only broadcast to outbound connections or does it broadcast to inbound connections as well? I hope to get the result according to the source code and it would be great if the answer would point out the file of the corresponding code.
All peers are treated equally when relaying chain-extending blocks (as James C. stated in a comment on another answer). The node will announce the block to all of its peers and since that block was just found, all of the peers should request the new block.
Many miners will also announce new blocks on Fast Internet Bitcoin Relay Engine (FIBRE) in addition. Any new block on FIBRE will be immediately broadcast to all participants in a compressed format based on compact blocks (BIP152).