This particular question has been bugging my mind for sometime now. Suppose there an adversary miner who mines a Block with one of his transactions. The miner would only send the updated Block to a known peer minor (Ma). And right after sending out the first Block to a known peer(Not to the whole network), the miner hits the jackpot and was able to generate another Block with the same transaction. It is highly unlike that the adversary could mine another block immediately after mining the previous block but it is doable.
Network --> [B1]->[B2]->[B3]->[S1]->[B4] Ma --> [B1]->[B2]->[B3]->[S2],
As I've shown above, once Ma receives B4, it has no way of knowing what the predecessor Block (S1) of B4 is.
Could someone please explain how Bitcoin handles these sort of issues ?