add validatepubkey RPC call
[novacoin.git] / src / protocol.h
index b516f1b..ed2ca59 100644 (file)
 #include <string>
 #include "uint256.h"
 
+#define PPCOIN_PORT  7777
+#define RPC_PORT     8344
+#define TESTNET_PORT 17777
+
 extern bool fTestNet;
+
+void GetMessageStart(unsigned char pchMessageStart[], bool fPersistent = false);
+
 static inline unsigned short GetDefaultPort(const bool testnet = fTestNet)
 {
-    return testnet ? 18333 : 8333;
+    return testnet ? TESTNET_PORT : PPCOIN_PORT;
 }
 
 
-extern unsigned char pchMessageStart[4];
-
 /** Message header.
  * (4) message start.
  * (12) command.
@@ -50,7 +55,7 @@ class CMessageHeader
     // TODO: make private (improves encapsulation)
     public:
         enum { COMMAND_SIZE=12 };
-        char pchMessageStart[sizeof(::pchMessageStart)];
+        unsigned char pchMessageStart[4];
         char pchCommand[COMMAND_SIZE];
         unsigned int nMessageSize;
         unsigned int nChecksum;