mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-08-05 06:24:49 +02:00
Diff-minimise
This commit is contained in:
parent
f9e091fc85
commit
d15b753382
@ -880,18 +880,19 @@ bool BlockManager::FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigne
|
|||||||
LogPrint(BCLog::BLOCKSTORAGE, "Leaving block file %i: %s (onto %i) (height %i)\n",
|
LogPrint(BCLog::BLOCKSTORAGE, "Leaving block file %i: %s (onto %i) (height %i)\n",
|
||||||
last_blockfile, m_blockfile_info[last_blockfile].ToString(), nFile, nHeight);
|
last_blockfile, m_blockfile_info[last_blockfile].ToString(), nFile, nHeight);
|
||||||
|
|
||||||
// Do not propagate the return code. The flush concerns a previous block
|
// Do not propagate the return code. The flush concerns a previous block
|
||||||
// and undo file that has already been written to. If a flush fails
|
// and undo file that has already been written to. If a flush fails
|
||||||
// here, and we crash, there is no expected additional block data
|
// here, and we crash, there is no expected additional block data
|
||||||
// inconsistency arising from the flush failure here. However, the undo
|
// inconsistency arising from the flush failure here. However, the undo
|
||||||
// data may be inconsistent after a crash if the flush is called during
|
// data may be inconsistent after a crash if the flush is called during
|
||||||
// a reindex. A flush error might also leave some of the data files
|
// a reindex. A flush error might also leave some of the data files
|
||||||
// untrimmed.
|
// untrimmed.
|
||||||
if (!FlushBlockFile(last_blockfile, !fKnown, finalize_undo)) {
|
if (!FlushBlockFile(last_blockfile, !fKnown, finalize_undo)) {
|
||||||
LogPrintLevel(BCLog::BLOCKSTORAGE, BCLog::Level::Warning,
|
LogPrintLevel(BCLog::BLOCKSTORAGE, BCLog::Level::Warning,
|
||||||
"Failed to flush previous block file %05i (finalize=%i, finalize_undo=%i) before opening new block file %05i\n",
|
"Failed to flush previous block file %05i (finalize=%i, finalize_undo=%i) before opening new block file %05i\n",
|
||||||
last_blockfile, !fKnown, finalize_undo, nFile);
|
last_blockfile, !fKnown, finalize_undo, nFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
// No undo data yet in the new file, so reset our undo-height tracking.
|
// No undo data yet in the new file, so reset our undo-height tracking.
|
||||||
m_blockfile_cursors[chain_type] = BlockfileCursor{nFile};
|
m_blockfile_cursors[chain_type] = BlockfileCursor{nFile};
|
||||||
|
Loading…
Reference in New Issue
Block a user