Changing pchMessageStart

The Bitcoin node broadcasts, in each P2P frame, 4 bytes known as magic values to ensure that only the client/peers belonging to the same network can communicate. The magic bytes are represented in the pchMessageStart[] array to identify the used network as described in the following table:

To differentiate our Readercoin network, we will change pchMessageStart values by incrementing them by 2. Always in chainparams.cpp, edit pchMessageStart in the CMainParams class using the following values:

pchMessageStart[0] = 0xfd;
pchMessageStart[1] = 0xc0;
pchMessageStart[2] = 0xb6;
pchMessageStart[3] = 0xdb;

For the CTestNetParams class:

pchMessageStart[0] = 0x0d;
pchMessageStart[1] = 0x13;
pchMessageStart[2] = 0x0b;
pchMessageStart[3] = 0x09;

For CRegTestParams (which represents the regression test network):

pchMessageStart[0] = 0xfc;
pchMessageStart[1] = 0xc1;
pchMessageStart[2] = 0xb7;
pchMessageStart[3] = 0xdc;

There is no special reason behind these specific values; you can use any value between the hexadecimal values 0 and 0xFF.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset