Skip to content

Commit 67a3d59

Browse files
committed
streams: remove unused code
1 parent 2db926f commit 67a3d59

File tree

4 files changed

+0
-16
lines changed

4 files changed

+0
-16
lines changed

src/node/blockstorage.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -684,10 +684,6 @@ bool BlockManager::UndoWriteToDisk(const CBlockUndo& blockundo, FlatFilePos& pos
684684

685685
// Write undo data
686686
long fileOutPos = fileout.tell();
687-
if (fileOutPos < 0) {
688-
LogError("%s: ftell failed\n", __func__);
689-
return false;
690-
}
691687
pos.nPos = (unsigned int)fileOutPos;
692688
fileout << blockundo;
693689

@@ -982,10 +978,6 @@ bool BlockManager::WriteBlockToDisk(const CBlock& block, FlatFilePos& pos) const
982978

983979
// Write block
984980
long fileOutPos = fileout.tell();
985-
if (fileOutPos < 0) {
986-
LogError("%s: ftell failed\n", __func__);
987-
return false;
988-
}
989981
pos.nPos = (unsigned int)fileOutPos;
990982
fileout << TX_WITH_WITNESS(block);
991983

src/node/utxo_snapshot.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,6 @@ std::optional<uint256> ReadSnapshotBaseBlockhash(fs::path chaindir)
7777
afile.seek(0, SEEK_END);
7878
if (position != afile.tell()) {
7979
LogPrintf("[snapshot] warning: unexpected trailing data in %s\n", read_from_str);
80-
} else if (afile.IsError()) {
81-
LogPrintf("[snapshot] warning: i/o error reading %s\n", read_from_str);
8280
}
8381
return base_blockhash;
8482
}

src/streams.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ bool AutoFile::Commit()
106106
return ::FileCommit(m_file);
107107
}
108108

109-
bool AutoFile::IsError()
110-
{
111-
return ferror(m_file);
112-
}
113-
114109
bool AutoFile::Truncate(unsigned size)
115110
{
116111
return ::TruncateFile(m_file, size);

src/streams.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,6 @@ class AutoFile
455455
}
456456

457457
bool Commit();
458-
bool IsError();
459458
bool Truncate(unsigned size);
460459
};
461460

0 commit comments

Comments
 (0)