Skip to content

Commit

Permalink
Remove GetTotalBlocksEstimate and checkpoint tests that test nothing.
Browse files Browse the repository at this point in the history
GetTotalBlocksEstimate is no longer used and it was the only thing
 the checkpoint tests were testing.

Since checkpoints are on their way out it makes more sense to remove
 the test file than to cook up a new pointless test.

Github-Pull: #9053
Rebased-From: 2082b5574cec783f4ff99941492d92e05680b293
  • Loading branch information
gmaxwell committed Dec 6, 2016
1 parent ad20cdd commit 5b93eee
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 41 deletions.
1 change: 0 additions & 1 deletion src/Makefile.test.include
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ BITCOIN_TESTS =\
test/bip32_tests.cpp \
test/blockencodings_tests.cpp \
test/bloom_tests.cpp \
test/Checkpoints_tests.cpp \
test/coins_tests.cpp \
test/compress_tests.cpp \
test/crypto_tests.cpp \
Expand Down
10 changes: 0 additions & 10 deletions src/checkpoints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,6 @@ namespace Checkpoints {
return fWorkBefore / (fWorkBefore + fWorkAfter);
}

int GetTotalBlocksEstimate(const CCheckpointData& data)
{
const MapCheckpoints& checkpoints = data.mapCheckpoints;

if (checkpoints.empty())
return 0;

return checkpoints.rbegin()->first;
}

CBlockIndex* GetLastCheckpoint(const CCheckpointData& data)
{
const MapCheckpoints& checkpoints = data.mapCheckpoints;
Expand Down
3 changes: 0 additions & 3 deletions src/checkpoints.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ struct CCheckpointData;
namespace Checkpoints
{

//! Return conservative estimate of total number of blocks, 0 if unknown
int GetTotalBlocksEstimate(const CCheckpointData& data);

//! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
CBlockIndex* GetLastCheckpoint(const CCheckpointData& data);

Expand Down
27 changes: 0 additions & 27 deletions src/test/Checkpoints_tests.cpp

This file was deleted.

0 comments on commit 5b93eee

Please sign in to comment.