Help: How to modify the pchMessageStart parameter based on the timestamp, since the coin I'm developing uses the same network magic number as LTC.
msy2008 opened this issue · 6 comments
The original developer of Ininitecoin used the same network magic number as Litecoin, which caused node mixing and cross-connection. I am trying to find a solution. I can activate the new network magic number based on the timestamp, but I need to restart the core wallet to take effect. How can I achieve the goal without restarting? Please help! Thanks
For example:
if (time(NULL) >= 1725868500) { // GMT: Monday, September 9, 2024, 7:55 AM
// new message header (New consensus network magic number)
pchMessageStart[0] = 0xfa;
pchMessageStart[1] = 0xbe;
pchMessageStart[2] = 0xc0;
pchMessageStart[3] = 0xde;
} else {
// old message header (IFC and LTC network magic number are the same, resulting in mixed node connections)
pchMessageStart[0] = 0xfb;
pchMessageStart[1] = 0xc0;
pchMessageStart[2] = 0xb6;
pchMessageStart[3] = 0xdb;
}
If I don't change the network magic number, the LTC nodes will be affected as more and more users come in the future.
I hope LTC developers can help me.
I can activate the new network magic number based on the timestamp, but I need to restart the core wallet to take effect. How can I achieve the goal without restarting?
According to the timestamp, the old and new versions can communicate before activation, and the new version does not need to communicate with the old version after activation. I will give at least 2 weeks for all nodes, mining pools, exchanges, and Explorers to update to the new version, but I cannot automatically switch to the new network magic number without restarting the wallet.