From: svost Date: Fri, 3 Feb 2017 05:15:28 +0000 (+0300) Subject: remove GetMedianTime( ) which is never used X-Git-Url: https://git.novaco.in/?p=novacoin.git;a=commitdiff_plain;h=5c783ffab6a5fc2cffe62e8a2fa399bc1f37a5cd remove GetMedianTime( ) which is never used --- diff --git a/src/main.cpp b/src/main.cpp index c47a80f..25dd390 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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; diff --git a/src/main.h b/src/main.h index a9f72ad..22beb5d 100644 --- a/src/main.h +++ b/src/main.h @@ -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