aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorGavin Andresen <gavinandresen@gmail.com>2013-04-09 10:51:06 -0700
committerGavin Andresen <gavinandresen@gmail.com>2013-04-09 10:51:06 -0700
commit1fd3ed25be95f79980b03c2ee36f72aea82baa4d (patch)
tree8a6a18ba0a33d17c05d7b1d2b70898cc32e88f21 /src/net.h
parent1483aac5f9a9de9fefbcbbe3edc34429b69aca9e (diff)
parent86648a8d16699ab392508a48bb867d3fc4f7d6cf (diff)
Merge pull request #2461 from sipa/syncnode
Make sure we always have a node to do IBD from
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 80773e3f19..32bbbca6dc 100644
--- a/src/net.h
+++ b/src/net.h
@@ -101,6 +101,9 @@ public:
bool fInbound;
int nStartingHeight;
int nMisbehavior;
+ uint64 nSendBytes;
+ uint64 nRecvBytes;
+ bool fSyncNode;
};
@@ -155,12 +158,14 @@ public:
CDataStream ssSend;
size_t nSendSize; // total size of all vSendMsg entries
size_t nSendOffset; // offset inside the first vSendMsg already sent
+ uint64 nSendBytes;
std::deque<CSerializeData> vSendMsg;
CCriticalSection cs_vSend;
std::deque<CInv> vRecvGetData;
std::deque<CNetMessage> vRecvMsg;
CCriticalSection cs_vRecvMsg;
+ uint64 nRecvBytes;
int nRecvVersion;
int64 nLastSend;
@@ -200,6 +205,7 @@ public:
CBlockIndex* pindexLastGetBlocksBegin;
uint256 hashLastGetBlocksEnd;
int nStartingHeight;
+ bool fStartSync;
// flood relay
std::vector<CAddress> vAddrToSend;
@@ -220,6 +226,8 @@ public:
nRecvVersion = MIN_PROTO_VERSION;
nLastSend = 0;
nLastRecv = 0;
+ nSendBytes = 0;
+ nRecvBytes = 0;
nLastSendEmpty = GetTime();
nTimeConnected = GetTime();
addr = addrIn;
@@ -239,6 +247,7 @@ public:
pindexLastGetBlocksBegin = 0;
hashLastGetBlocksEnd = 0;
nStartingHeight = -1;
+ fStartSync = false;
fGetAddr = false;
nMisbehavior = 0;
fRelayTxes = false;