I looked at the question on how transactions are broadcast to the rest of the network in the blockchain network. In this stack exchange post, the author @morsecoder in the accepted answer mentions that :
Think of it like how gossip would spread. There are a bunch of people (nodes), and when one of them knows something, they tell it to the few (8 or so) people they are near (connected with), and then those people tell a few more people the message that was told to them, and then... Eventually everyone knows about the original information (transaction).
But what if all the eight nodes to whom a given node send the transaction are malicious/faulty? And all of them change the message in the original transaction. Wouldn't it allow for wrong transaction to get merged in the blockchain network?
Also, once any given node sends the transaction it received to its peers, how does the network know that majority of peers have received the correct transaction and it's ready to get merged in the main chain. I'm not talking about the bitcoin network here. So, I'm not worried about the PoW for now. I just want to know that when a node sends the transaction it received to its peers, the peers send it to their peers, how does the network keep the count of which transaction has been accepted by how many nodes?