remove GetMedianTime( ) which is never used
This commit is contained in:
parent
5bd4adca71
commit
28b6c1def5
2 changed files with 0 additions and 15 deletions
13
src/main.cpp
13
src/main.cpp
|
@ -2575,19 +2575,6 @@ bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, uns
|
||||||
return (nFound >= nRequired);
|
return (nFound >= nRequired);
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t CBlockIndex::GetMedianTime() const
|
|
||||||
{
|
|
||||||
AssertLockHeld(cs_main);
|
|
||||||
const CBlockIndex* pindex = this;
|
|
||||||
for (int i = 0; i < nMedianTimeSpan/2; i++)
|
|
||||||
{
|
|
||||||
if (!chainActive.Next(pindex))
|
|
||||||
return GetBlockTime();
|
|
||||||
pindex = chainActive.Next(pindex);
|
|
||||||
}
|
|
||||||
return pindex->GetMedianTimePast();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd)
|
void PushGetBlocks(CNode* pnode, CBlockIndex* pindexBegin, uint256 hashEnd)
|
||||||
{
|
{
|
||||||
AssertLockHeld(cs_main);
|
AssertLockHeld(cs_main);
|
||||||
|
|
|
@ -849,8 +849,6 @@ public:
|
||||||
return pbegin[(pend - pbegin)/2];
|
return pbegin[(pend - pbegin)/2];
|
||||||
}
|
}
|
||||||
|
|
||||||
int64_t GetMedianTime() const;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns true if there are nRequired or more blocks of minVersion or above
|
* Returns true if there are nRequired or more blocks of minVersion or above
|
||||||
* in the last nToCheck blocks, starting at pstart and going backwards.
|
* in the last nToCheck blocks, starting at pstart and going backwards.
|
||||||
|
|
Loading…
Reference in a new issue