From 28b6c1def57360ca5a05745faafaec53910f5e88 Mon Sep 17 00:00:00 2001 From: Kamil Domanski Date: Tue, 13 May 2014 21:37:47 +0200 Subject: [PATCH] remove GetMedianTime( ) which is never used --- src/main.cpp | 13 ------------- src/main.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index c54fa6523..126b4ada5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2575,19 +2575,6 @@ bool CBlockIndex::IsSuperMajority(int minVersion, const CBlockIndex* pstart, uns 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) { AssertLockHeld(cs_main); diff --git a/src/main.h b/src/main.h index f47c9ee82..25f70e7ad 100644 --- a/src/main.h +++ b/src/main.h @@ -849,8 +849,6 @@ public: return pbegin[(pend - pbegin)/2]; } - int64_t GetMedianTime() const; - /** * Returns true if there are nRequired or more blocks of minVersion or above * in the last nToCheck blocks, starting at pstart and going backwards.