mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 21:12:48 +01:00
Remove dead code: CTxDB::EraseBlockIndex(), CBlockIndex::EraseBlockFromDisk()
This commit is contained in:
parent
790fe2e558
commit
a7d45c5a7a
@ -463,11 +463,6 @@ bool CTxDB::WriteBlockIndex(const CDiskBlockIndex& blockindex)
|
|||||||
return Write(make_pair(string("blockindex"), blockindex.GetBlockHash()), 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)
|
bool CTxDB::ReadHashBestChain(uint256& hashBestChain)
|
||||||
{
|
{
|
||||||
return Read(string("hashBestChain"), hashBestChain);
|
return Read(string("hashBestChain"), hashBestChain);
|
||||||
|
1
src/db.h
1
src/db.h
@ -285,7 +285,6 @@ public:
|
|||||||
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex);
|
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx, CTxIndex& txindex);
|
||||||
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx);
|
bool ReadDiskTx(COutPoint outpoint, CTransaction& tx);
|
||||||
bool WriteBlockIndex(const CDiskBlockIndex& blockindex);
|
bool WriteBlockIndex(const CDiskBlockIndex& blockindex);
|
||||||
bool EraseBlockIndex(uint256 hash);
|
|
||||||
bool ReadHashBestChain(uint256& hashBestChain);
|
bool ReadHashBestChain(uint256& hashBestChain);
|
||||||
bool WriteHashBestChain(uint256 hashBestChain);
|
bool WriteHashBestChain(uint256 hashBestChain);
|
||||||
bool ReadBestInvalidWork(CBigNum& bnBestInvalidWork);
|
bool ReadBestInvalidWork(CBigNum& bnBestInvalidWork);
|
||||||
|
15
src/main.h
15
src/main.h
@ -1130,21 +1130,6 @@ public:
|
|||||||
return CheckProofOfWork(GetBlockHash(), nBits);
|
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 };
|
enum { nMedianTimeSpan=11 };
|
||||||
|
|
||||||
int64 GetMedianTimePast() const
|
int64 GetMedianTimePast() const
|
||||||
|
Loading…
Reference in New Issue
Block a user