mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-13 07:28:59 +01:00
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.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user