Add WalletDb Initialization to StorageNode::new() in src/storage.rs #104
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.
PR Description: Enhance WalletDb Initialization in StorageNode
Summary of Changes
This pull request updates the
StorageNode::new()function insrc/storage.rsto include a new initialization for theWalletDb. The implementation mirrors the existingWalletDbinitialization found insrc/miner.rs, ensuring consistency across the codebase.Motivation
The motivation for this change stems from a need for uniformity in how the
WalletDbis initialized throughout the application. By adopting a similar initialization pattern inStorageNode, we aim to enhance code maintainability and clarity, aligning with best practices.Relevant Context
The
WalletDbis a critical component that handles wallet data management. Ensuring that it is initialized correctly in multiple locations within our codebase helps prevent potential runtime errors and streamlines future updates. The specific requirement to work solely withinsrc/storage.rswas adhered to, maintaining the integrity of other components.Testing Instructions
To test the changes made:
StorageNode::new()function insrc/storage.rsto ensure theWalletDbinitialization has been properly integrated.WalletDb.Known Issues or Limitations
src/storage.rs, it should not affect any other functionalities. However, additional testing in related areas is always recommended to ensure stability.This PR serves to bolster the integrity of the application's architecture while maintaining focused enhancements per the user's request.