aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@exmulti.com>2012-05-17 08:47:54 -0700
committerJeff Garzik <jgarzik@exmulti.com>2012-05-17 08:47:54 -0700
commitd17ac27a727a7a942aea6c5d8b549e4ce56f34a7 (patch)
tree9a60cf439ec96e9b06e3b59d689a3b0bf794c34a
parentb56843b25356784d6806b2cdd6506bfb2e066445 (diff)
parenta7d45c5a7a46255631bb4814c3df27c3489ff3a0 (diff)
Merge pull request #1316 from jgarzik/dead-code
Remove dead code: CTxDB::EraseBlockIndex(), CBlockIndex::EraseBlockFromDisk()
-rw-r--r--src/db.cpp5
-rw-r--r--src/db.h1
-rw-r--r--src/main.h15
3 files changed, 0 insertions, 21 deletions
diff --git a/src/db.cpp b/src/db.cpp
index 5b36a8f1f5..4c38873eed 100644
--- a/src/db.cpp
+++ b/src/db.cpp
@@ -461,11 +461,6 @@ bool CTxDB::WriteBlockIndex(const CDiskBlockIndex& blockindex)
return Write(make_pair(string("blockindex"), blockindex.GetBlockHash()), blockindex);
}
-bool CTxDB::EraseBlockIndex(uint256 hash)
-{
- return Erase(make_pair(string("blockindex"), hash));
-}
-
bool CTxDB::ReadHashBestChain(uint256& hashBestChain)
{
return Read(string("hashBestChain"), hashBestChain);
diff --git a/src/db.h b/src/db.h
index 4f8e5d04fe..9cec267e98 100644
--- a/src/db.h
+++ b/src/db.h
@@ -285,7 +285,6 @@ public:
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex);
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx);
bool WriteBlockIndex(const CDiskBlockIndex& blockindex);
- bool EraseBlockIndex(uint256 hash);
bool ReadHashBestChain(uint256& hashBestChain);
bool WriteHashBestChain(uint256 hashBestChain);
bool ReadBestInvalidWork(CBigNum& bnBestInvalidWork);
diff --git a/src/main.h b/src/main.h
index 331b16b509..d9eea2a329 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1124,21 +1124,6 @@ public:
return CheckProofOfWork(GetBlockHash(), nBits);
}
- bool EraseBlockFromDisk()
- {
- // Open history file
- CAutoFile fileout = CAutoFile(OpenBlockFile(nFile, nBlockPos, "rb+"), SER_DISK, CLIENT_VERSION);
- if (!fileout)
- return false;
-
- // Overwrite with empty null block
- CBlock block;
- block.SetNull();
- fileout << block;
-
- return true;
- }
-
enum { nMedianTimeSpan=11 };
int64 GetMedianTimePast() const