mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
Merge pull request #4134
aa250f0 Remove NumBlocksOfPeers (Wladimir J. van der Laan)
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -54,8 +54,6 @@ int64_t CTransaction::nMinTxFee = 10000; // Override with -mintxfee
|
||||
/** Fees smaller than this (in satoshi) are considered zero fee (for relaying and mining) */
|
||||
int64_t CTransaction::nMinRelayTxFee = 1000;
|
||||
|
||||
static CMedianFilter<int> cPeerBlockCounts(8, 0); // Amount of blocks that other nodes claim to have
|
||||
|
||||
struct COrphanBlock {
|
||||
uint256 hashBlock;
|
||||
uint256 hashPrev;
|
||||
@@ -1307,12 +1305,6 @@ bool CheckProofOfWork(uint256 hash, unsigned int nBits)
|
||||
return true;
|
||||
}
|
||||
|
||||
// Return maximum amount of blocks that other nodes claim to have
|
||||
int GetNumBlocksOfPeers()
|
||||
{
|
||||
return std::max(cPeerBlockCounts.median(), Checkpoints::GetTotalBlocksEstimate());
|
||||
}
|
||||
|
||||
bool IsInitialBlockDownload()
|
||||
{
|
||||
LOCK(cs_main);
|
||||
@@ -3583,9 +3575,6 @@ bool static ProcessMessage(CNode* pfrom, string strCommand, CDataStream& vRecv)
|
||||
LogPrintf("receive version message: %s: version %d, blocks=%d, us=%s, them=%s, peer=%s\n", pfrom->cleanSubVer, pfrom->nVersion, pfrom->nStartingHeight, addrMe.ToString(), addrFrom.ToString(), pfrom->addr.ToString());
|
||||
|
||||
AddTimeData(pfrom->addr, nTime);
|
||||
|
||||
LOCK(cs_main);
|
||||
cPeerBlockCounts.input(pfrom->nStartingHeight);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user