mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 02:25:40 +01:00
Remove duplicate nBlocksEstimate cmp (we already checked IsIBD())
This commit is contained in:
parent
87e7d72807
commit
0278fb5f48
@ -3087,12 +3087,9 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Relay inventory, but don't relay old inventory during initial block download.
|
// Relay inventory, but don't relay old inventory during initial block download.
|
||||||
int nBlockEstimate = 0;
|
|
||||||
if (fCheckpointsEnabled)
|
|
||||||
nBlockEstimate = Checkpoints::GetTotalBlocksEstimate(chainparams.Checkpoints());
|
|
||||||
if(connman) {
|
if(connman) {
|
||||||
connman->ForEachNode([nNewHeight, nBlockEstimate, &vHashes](CNode* pnode) {
|
connman->ForEachNode([nNewHeight, &vHashes](CNode* pnode) {
|
||||||
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : nBlockEstimate)) {
|
if (nNewHeight > (pnode->nStartingHeight != -1 ? pnode->nStartingHeight - 2000 : 0)) {
|
||||||
BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
|
BOOST_REVERSE_FOREACH(const uint256& hash, vHashes) {
|
||||||
pnode->PushBlockHash(hash);
|
pnode->PushBlockHash(hash);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user