aboutsummaryrefslogtreecommitdiff
path: root/src/net.h
diff options
context:
space:
mode:
authorPieter Wuille <pieter.wuille@gmail.com>2013-04-05 00:43:04 +0200
committerPieter Wuille <pieter.wuille@gmail.com>2013-04-07 19:19:13 +0200
commit6ed71b5e4faa2ea6d739eefa9c3dcc15db80439c (patch)
tree4ae32dd9b5153c1fd1cad299518ede52a9f1bf69 /src/net.h
parent31dead887d7658660e89d14c22d494baeca874e9 (diff)
downloadbitcoin-6ed71b5e4faa2ea6d739eefa9c3dcc15db80439c.tar.xz
Make sure we always have a node to do IBD from
This introduces the concept of the 'sync node', which is the one we asked for missing blocks. In case the sync node goes away, a new one will be selected. For now, the heuristic is very simple, but it can easily be extended later to add better policies.
Diffstat (limited to 'src/net.h')
-rw-r--r--src/net.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net.h b/src/net.h
index 30b9ac8663..2a8b7f09ee 100644
--- a/src/net.h
+++ b/src/net.h
@@ -202,6 +202,7 @@ public:
CBlockIndex* pindexLastGetBlocksBegin;
uint256 hashLastGetBlocksEnd;
int nStartingHeight;
+ bool fStartSync;
// flood relay
std::vector<CAddress> vAddrToSend;
@@ -242,6 +243,7 @@ public:
pindexLastGetBlocksBegin = 0;
hashLastGetBlocksEnd = 0;
nStartingHeight = -1;
+ fStartSync = false;
fGetAddr = false;
nMisbehavior = 0;
fRelayTxes = false;