-
Notifications
You must be signed in to change notification settings - Fork 221
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed the memory copy of metadata from the blockchain db and made…
… the backend responsible for providing fast access to the chain metadata. - A memory copy of the metadata was added to lmdb_db, and the backend was made responsible for restoring the memory copy and keeping it in sync with the persistent stored version. - Removed all unused memory chain metadata functions and parameters from the blockchain db, mempool, consensus manager and difficulty adjustment manager. - The validation train, block validators and transaction validators were updated to not need access to the chain metadata as it can be obtained from the blockchain backend. - Modified the rewind_to_height function to update the metadata with the set of rewind db transactions ensuring it does not get updated when the db transaction fails. - Added fetch_metadata to blockchain backend trait and provided implementations for lmdb_db, memory_db and mock_db. (#1666) Merge pull request #1666 - Removed the memory copy of metadata from the blockchain db and made the backend responsible for providing fast access to the chain metadata. - A memory copy of the metadata was added to lmdb_db, and the backend was made responsible for restoring the memory copy and keeping it in sync with the persistent stored version. - Removed all unused memory chain metadata functions and parameters from the blockchain db, mempool, consensus manager and difficulty adjustment manager. - The validation train, block validators and transaction validators were updated to not need access to the chain metadata as it can be obtained from the blockchain backend. - Modified the rewind_to_height function to update the metadata with the set of rewind db transactions ensuring it does not get updated when the db transaction fails. - Added fetch_metadata to blockchain backend trait and provided implementations for lmdb_db, memory_db and mock_db. * pull/1666/head: - Removed the memory copy of metadata from the blockchain db and made the backend responsible for providing fast access to the chain metadata. - A memory copy of the metadata was added to lmdb_db, and the backend was made responsible for restoring the memory copy and keeping it in sync with the persistent stored version. - Removed all unused memory chain metadata functions and parameters from the blockchain db, mempool, consensus manager and difficulty adjustment manager. - The validation train, block validators and transaction validators were updated to not need access to the chain metadata as it can be obtained from the blockchain backend. - Modified the rewind_to_height function to update the metadata with the set of rewind db transactions ensuring it does not get updated when the db transaction fails. - Added fetch_metadata to blockchain backend trait and provided implementations for lmdb_db, memory_db and mock_db.
- Loading branch information
Showing
15 changed files
with
319 additions
and
416 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
268 changes: 48 additions & 220 deletions
268
base_layer/core/src/chain_storage/blockchain_database.rs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.