remove GetMedianTime( ) which is never used
authorsvost <ya.nowa@yandex.ru>
Fri, 3 Feb 2017 05:15:28 +0000 (08:15 +0300)
committersvost <ya.nowa@yandex.ru>
Fri, 3 Feb 2017 05:15:28 +0000 (08:15 +0300)
src/main.cpp
src/main.h

index c47a80f..25dd390 100644 (file)
@@ -2717,18 +2717,6 @@ int64_t CBlockIndex::GetMedianTimePast() const
     return pbegin[(pend - pbegin)/2];
 }
 
-int64_t CBlockIndex::GetMedianTime() const
-{
-    const CBlockIndex* pindex = this;
-    for (int i = 0; i < nMedianTimeSpan/2; i++)
-    {
-        if (!pindex->pnext)
-            return GetBlockTime();
-        pindex = pindex->pnext;
-    }
-    return pindex->GetMedianTimePast();
-}
-
 bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned int nRequired, unsigned int nToCheck)
 {
     unsigned int nFound = 0;
index a9f72ad..22beb5d 100644 (file)
@@ -948,7 +948,6 @@ public:
     }
 
     int64_t GetMedianTimePast() const;
-    int64_t GetMedianTime() const;
 
     /**
      * Returns true if there are nRequired or more blocks of minVersion or above