#include <deque>
#include <stdint.h>
-#ifndef WIN32
+#ifndef _WIN32
#include <arpa/inet.h>
#endif
class CBlockIndex;
class CScheduler;
class CNode;
+extern uint160 VERUS_NODEID;
namespace boost {
class thread_group;
/** The maximum number of entries in setAskFor (larger due to getdata latency)*/
static const size_t SETASKFOR_MAX_SZ = 2 * MAX_INV_SZ;
/** The maximum number of peer connections to maintain. */
-static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 125;
+static const unsigned int DEFAULT_MAX_PEER_CONNECTIONS = 384;
/** The period before a network upgrade activates, where connections to upgrading peers are preferred (in blocks). */
static const int NETWORK_UPGRADE_PEER_PREFERENCE_BLOCK_PERIOD = 24 * 24 * 3;
std::string addrName;
CService addrLocal;
int nVersion;
+ int lasthdrsreq,sendhdrsreq;
// strSubVer is whatever byte array we read from the wire. However, this field is intended
// to be printed out, displayed to humans in various forms and so on. So we sanitize it and
// store the sanitized version in cleanSubVer. The original should be used when dealing with
CSemaphoreGrant grantOutbound;
CCriticalSection cs_filter;
CBloomFilter* pfilter;
+
int nRefCount;
NodeId id;
protected:
void Fuzz(int nChance); // modifies ssSend
public:
+ // for PBaaS nodes, each node may be associated with the hash of a pubkey as a payment address to receive rewards for supporting a
+ // PBaaS chain
+ uint160 hashPaymentAddress;
+
uint256 hashContinue;
int nStartingHeight;
}
}
+ template<typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9, typename T10>
+ void PushMessage(const char* pszCommand, const T1& a1, const T2& a2, const T3& a3, const T4& a4, const T5& a5, const T6& a6, const T7& a7, const T8& a8, const T9& a9, const T10& a10)
+ {
+ try
+ {
+ BeginMessage(pszCommand);
+ ssSend << a1 << a2 << a3 << a4 << a5 << a6 << a7 << a8 << a9 << a10;
+ EndMessage();
+ }
+ catch (...)
+ {
+ AbortMessage();
+ throw;
+ }
+ }
+
void CloseSocketDisconnect();
// Denial-of-service detection/prevention