diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 44c2808c3bd..07878a56029 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -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); diff --git a/src/node/utxo_snapshot.cpp b/src/node/utxo_snapshot.cpp index 7d589c886b8..ca5491bdc2b 100644 --- a/src/node/utxo_snapshot.cpp +++ b/src/node/utxo_snapshot.cpp @@ -77,8 +77,6 @@ std::optional 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; } diff --git a/src/streams.cpp b/src/streams.cpp index 5f7baf92b9e..baa5ad7abed 100644 --- a/src/streams.cpp +++ b/src/streams.cpp @@ -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); diff --git a/src/streams.h b/src/streams.h index 431a4d77c6c..8a5af68dee8 100644 --- a/src/streams.h +++ b/src/streams.h @@ -455,7 +455,6 @@ public: } bool Commit(); - bool IsError(); bool Truncate(unsigned size); };