mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Merge pull request #4134
aa250f0 Remove NumBlocksOfPeers (Wladimir J. van der Laan)
This commit is contained in:
commit
82564e21e7
9 changed files with 19 additions and 75 deletions
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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue