mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-28 18:15:05 +02:00
streams: remove unused code
This commit is contained in:
@@ -684,10 +684,6 @@ bool BlockManager::UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos
|
||||
|
||||
// Write undo data
|
||||
long fileOutPos = fileout.tell();
|
||||
if (fileOutPos < 0) {
|
||||
LogError("%s: ftell failed\n", __func__);
|
||||
return false;
|
||||
}
|
||||
pos.nPos = (unsigned int)fileOutPos;
|
||||
fileout << blockundo;
|
||||
|
||||
@@ -982,10 +978,6 @@ bool BlockManager::WriteBlockToDisk(const CBlock& block, FlatFilePos& pos) const
|
||||
|
||||
// Write block
|
||||
long fileOutPos = fileout.tell();
|
||||
if (fileOutPos < 0) {
|
||||
LogError("%s: ftell failed\n", __func__);
|
||||
return false;
|
||||
}
|
||||
pos.nPos = (unsigned int)fileOutPos;
|
||||
fileout << TX_WITH_WITNESS(block);
|
||||
|
||||
|
@@ -77,8 +77,6 @@ std::optional<uint256> ReadSnapshotBaseBlockhash(fs::path chaindir)
|
||||
afile.seek(0, SEEK_END);
|
||||
if (position != afile.tell()) {
|
||||
LogPrintf("[snapshot] warning: unexpected trailing data in %s\n", read_from_str);
|
||||
} else if (afile.IsError()) {
|
||||
LogPrintf("[snapshot] warning: i/o error reading %s\n", read_from_str);
|
||||
}
|
||||
return base_blockhash;
|
||||
}
|
||||
|
@@ -106,11 +106,6 @@ bool AutoFile::Commit()
|
||||
return ::FileCommit(m_file);
|
||||
}
|
||||
|
||||
bool AutoFile::IsError()
|
||||
{
|
||||
return ferror(m_file);
|
||||
}
|
||||
|
||||
bool AutoFile::Truncate(unsigned size)
|
||||
{
|
||||
return ::TruncateFile(m_file, size);
|
||||
|
@@ -455,7 +455,6 @@ public:
|
||||
}
|
||||
|
||||
bool Commit();
|
||||
bool IsError();
|
||||
bool Truncate(unsigned size);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user