mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 22:50:59 +01:00
doc: Add and edit some comments around assumeutxo
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
@@ -761,9 +761,10 @@ bool BlockManager::FlushChainstateBlockFile(int tip_height)
|
||||
{
|
||||
LOCK(cs_LastBlockFile);
|
||||
auto& cursor = m_blockfile_cursors[BlockfileTypeForHeight(tip_height)];
|
||||
// If the cursor does not exist, it means an assumeutxo snapshot is loaded,
|
||||
// but no blocks past the snapshot height have been written yet, so there
|
||||
// is no data associated with the chainstate, and it is safe not to flush.
|
||||
if (cursor) {
|
||||
// The cursor may not exist after a snapshot has been loaded but before any
|
||||
// blocks have been downloaded.
|
||||
return FlushBlockFile(cursor->file_num, /*fFinalize=*/false, /*finalize_undo=*/false);
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user