Say I just made a new altcoin. I mined it for a few days at some reasanoble difficulty - 2000 for example. I got to the 10 000th block and I am happy with my premine and network.
Then, an attacker downloads my client and without connecting to the network, starts mining with some huge hashing power. So for 24 hours, he is at block 12 000th with difficulty of 5000.
Then, he connects to my network. Wouldn't that make all my nodes sync with his network? This way I would lose my premine, wouldn't I?
Is that the case? Can I prevent the attack?