mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Merge 69ddee6f39 into merged_master (Bitcoin PR bitcoin/bitcoin#27039)
This commit is contained in:
commit
af7e42fc56
2 changed files with 17 additions and 16 deletions
|
|
@ -999,19 +999,19 @@ bool BlockManager::FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigne
|
|||
if (!fKnown) {
|
||||
LogPrint(BCLog::BLOCKSTORAGE, "Leaving block file %i: %s (onto %i) (height %i)\n",
|
||||
last_blockfile, m_blockfile_info[last_blockfile].ToString(), nFile, nHeight);
|
||||
}
|
||||
|
||||
// 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
|
||||
// here, and we crash, there is no expected additional block data
|
||||
// inconsistency arising from the flush failure here. However, the undo
|
||||
// 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
|
||||
// untrimmed.
|
||||
if (!FlushBlockFile(last_blockfile, !fKnown, finalize_undo)) {
|
||||
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",
|
||||
last_blockfile, !fKnown, finalize_undo, nFile);
|
||||
// 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
|
||||
// here, and we crash, there is no expected additional block data
|
||||
// inconsistency arising from the flush failure here. However, the undo
|
||||
// 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
|
||||
// untrimmed.
|
||||
if (!FlushBlockFile(last_blockfile, !fKnown, finalize_undo)) {
|
||||
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",
|
||||
last_blockfile, !fKnown, finalize_undo, nFile);
|
||||
}
|
||||
}
|
||||
// No undo data yet in the new file, so reset our undo-height tracking.
|
||||
m_blockfile_cursors[chain_type] = BlockfileCursor{nFile};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue