Skip to content

Commit 2082b55

Browse files
committed
Remove GetTotalBlocksEstimate and checkpoint tests that test nothing.
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.
1 parent fd46136 commit 2082b55

File tree

4 files changed

+0
-41
lines changed

4 files changed

+0
-41
lines changed

src/Makefile.test.include

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ BITCOIN_TESTS =\
5050
test/bip32_tests.cpp \
5151
test/blockencodings_tests.cpp \
5252
test/bloom_tests.cpp \
53-
test/Checkpoints_tests.cpp \
5453
test/coins_tests.cpp \
5554
test/compress_tests.cpp \
5655
test/crypto_tests.cpp \

src/checkpoints.cpp

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ namespace Checkpoints {
5555
return fWorkBefore / (fWorkBefore + fWorkAfter);
5656
}
5757

58-
int GetTotalBlocksEstimate(const CCheckpointData& data)
59-
{
60-
const MapCheckpoints& checkpoints = data.mapCheckpoints;
61-
62-
if (checkpoints.empty())
63-
return 0;
64-
65-
return checkpoints.rbegin()->first;
66-
}
67-
6858
CBlockIndex* GetLastCheckpoint(const CCheckpointData& data)
6959
{
7060
const MapCheckpoints& checkpoints = data.mapCheckpoints;

src/checkpoints.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ struct CCheckpointData;
1919
namespace Checkpoints
2020
{
2121

22-
//! Return conservative estimate of total number of blocks, 0 if unknown
23-
int GetTotalBlocksEstimate(const CCheckpointData& data);
24-
2522
//! Returns last CBlockIndex* in mapBlockIndex that is a checkpoint
2623
CBlockIndex* GetLastCheckpoint(const CCheckpointData& data);
2724

src/test/Checkpoints_tests.cpp

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)