What is the main difference between the mainnet code and the non-main network code,thanks!!!!!
The code used for the MainNet and other networks, such as TestNets or alternate networks, is normally the same. Some alternate networks may make alterations to the code for their specific purposes, but generally, the code is the same.
While the code is exactly the same, there might be some additional system contracts deployed on a testnet that give the block producers the ability to do things that aren't possible on the mainnet. Think of pausing the blockchain, creating tokens out of thin air, and handling bandwidth, CPU and RAM allocation differently.