X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Fprotocol.h;h=d771406b7cfdf4b582ed0d9fbf18b1fd0dea5dc7;hb=84a4a7763f386934da90e2bd1e355b70023fa9ca;hp=f7331c19233d7a22742f83af9c2fe003d509e741;hpb=ccd65d426156c3d5b7a8f1123210decd1f06fe42;p=novacoin.git diff --git a/src/protocol.h b/src/protocol.h index f7331c1..d771406 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -1,7 +1,7 @@ // Copyright (c) 2009-2010 Satoshi Nakamoto // Copyright (c) 2009-2012 The Bitcoin developers // Distributed under the MIT/X11 software license, see the accompanying -// file license.txt or http://www.opensource.org/licenses/mit-license.php. +// file COPYING or http://www.opensource.org/licenses/mit-license.php. #ifndef __cplusplus # error This header can only be compiled as C++. @@ -18,7 +18,7 @@ extern bool fTestNet; static inline unsigned short GetDefaultPort(const bool testnet = fTestNet) { - return testnet ? 18333 : 8333; + return testnet ? 17777 : 7777; } @@ -49,8 +49,16 @@ class CMessageHeader // TODO: make private (improves encapsulation) public: - enum { COMMAND_SIZE=12 }; - char pchMessageStart[sizeof(::pchMessageStart)]; + enum { + MESSAGE_START_SIZE=sizeof(::pchMessageStart), + COMMAND_SIZE=12, + MESSAGE_SIZE_SIZE=sizeof(int), + CHECKSUM_SIZE=sizeof(int), + + MESSAGE_SIZE_OFFSET=MESSAGE_START_SIZE+COMMAND_SIZE, + CHECKSUM_OFFSET=MESSAGE_SIZE_OFFSET+MESSAGE_SIZE_SIZE + }; + char pchMessageStart[MESSAGE_START_SIZE]; char pchCommand[COMMAND_SIZE]; unsigned int nMessageSize; unsigned int nChecksum;