-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ChainDB.Iterator: read the switchover point from memory
When streaming from both the ImmutableDB and the VolatileDB, we need to know the switchover point, i.e. the tip of the ImmutableDB. Previously, we were reading that whole block from disk to figure out its hash, while we already had the necessary information in memory: the anchor point of the in-memory chain fragment refers to the tip of the ImmutableDB (see the invariant of 'cdbChain'). We now take advantage of this information and avoid one extra block read.
- Loading branch information
Showing
2 changed files
with
52 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters