diff options
| author | Pieter Wuille <[email protected]> | 2013-06-22 06:56:14 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2013-06-22 06:56:14 -0700 |
| commit | 01b45731b75a19ac194b4206b20716bfedcb2357 (patch) | |
| tree | 90bd76e552d0ac7b44382885e212d9705fe24d96 /src/protocol.cpp | |
| parent | Merge pull request #2781 from sipa/keytimemem (diff) | |
| parent | Introduce a CChainParameters singleton class and regtest mode. (diff) | |
| download | discoin-01b45731b75a19ac194b4206b20716bfedcb2357.tar.xz discoin-01b45731b75a19ac194b4206b20716bfedcb2357.zip | |
Merge pull request #2632 from mikehearn/chainparams
Refactor chain-specific tweaks into a CChainParams class and introduce a regtest mode
Diffstat (limited to 'src/protocol.cpp')
| -rw-r--r-- | src/protocol.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/protocol.cpp b/src/protocol.cpp index 1e22467a3..745b4338e 100644 --- a/src/protocol.cpp +++ b/src/protocol.cpp @@ -21,7 +21,7 @@ static const char* ppszTypeName[] = CMessageHeader::CMessageHeader() { - memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart)); + memcpy(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE); memset(pchCommand, 0, sizeof(pchCommand)); pchCommand[1] = 1; nMessageSize = -1; @@ -30,7 +30,7 @@ CMessageHeader::CMessageHeader() CMessageHeader::CMessageHeader(const char* pszCommand, unsigned int nMessageSizeIn) { - memcpy(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart)); + memcpy(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE); strncpy(pchCommand, pszCommand, COMMAND_SIZE); nMessageSize = nMessageSizeIn; nChecksum = 0; @@ -47,7 +47,7 @@ std::string CMessageHeader::GetCommand() const bool CMessageHeader::IsValid() const { // Check start string - if (memcmp(pchMessageStart, ::pchMessageStart, sizeof(pchMessageStart)) != 0) + if (memcmp(pchMessageStart, Params().MessageStart(), MESSAGE_START_SIZE) != 0) return false; // Check the command string for errors |