Basic confirmation request loop enhancements #2327
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is split 1/? (a safe one) from #2306
_l
for local variables inrequest_confirm
as it's a large functionnode.ledger.block_count_cache > node.ledger.cemented_count + roots.size () + pending_confirmation_height_size
before checking frontiers as that can read the disk for 2 seconds when not necessary. It's still not perfect, per the in-file comment, as e.g., 10 roots can be added and they're transformed into a single frontier by the confirmation height processor. Open to ideas on making this condition more consistent.