mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
doc: Add and edit some comments around assumeutxo
Co-authored-by: Ryan Ofsky <ryan@ofsky.org>
This commit is contained in:
parent
0a39b8cbd8
commit
a47fbe7d49
4 changed files with 15 additions and 14 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue