Where are the Main network magic bytes stored in bitcoin's source code?

3

1

Bitcoin uses F9 BE B4 D9 as its main network magic bytes. I've searched the source but cannot find where these values are stored. Presumably they're computed, but I'm not sure where. Can someone tell me where they exist or are computed in the source code? I'm wanting to find this value for other altcoins.

greatwitenorth

Posted 2015-02-05T15:20:15.077

Reputation: 215

Answers

4

See the file chainparams.cpp in the constructor for class CMainParams:

pchMessageStart[0] = 0xf9;
pchMessageStart[1] = 0xbe;
pchMessageStart[2] = 0xb4;
pchMessageStart[3] = 0xd9;

Nate Eldredge

Posted 2015-02-05T15:20:15.077

Reputation: 21 420