Skip to content

Conversation

@Sophie-Ag00001
Copy link
Collaborator

## Summary
This PR adds a `wallet_db` attribute to the `MempoolNode` struct and initializes it in the `MempoolNode::new()` function using the provided `WalletDb` initialization code. The `WalletDb` is created with configuration parameters and extra data already available in the `MempoolNode::new()` context.

## Motivation
The addition of the `wallet_db` attribute is necessary to integrate wallet database functionality into the `MempoolNode` struct. This change ensures that the mempool node has access to wallet-related data and operations, which is essential for supporting wallet features within the mempool.

## Context
The `WalletDb` initialization requires specific configuration parameters (`mempool_db_mode`, `passphrase`, and `custom_wallet_spec`) and extra data (`wallet_db`). These are already accessible in the `MempoolNode::new()` function, making it straightforward to initialize the `wallet_db` attribute during node creation.

## Testing
To test the changes:
1. Ensure that the `MempoolNode::new()` function correctly initializes the `wallet_db` attribute.
2. Verify that the `wallet_db` is properly integrated into the `MempoolNode` struct and can be accessed as needed.
3. Run existing tests to confirm that no existing functionality is broken by this change.

## Known Issues
- None at this time. This change is limited to adding the `wallet_db` attribute and its initialization, with no other code modifications.

…nitialization to the MempoolNode::new() function like so:

let wallet_db = WalletDb::new(
    config.mempool_db_mode,
    extra.wallet_db.take(),
    config.passphrase,
    extra.custom_wallet_spec,
)?;

DO NOT DO ANYTHING ELSE. DO NOT DELETE CODE. DO NOT EDIT ANY OTHER CODE
@Sophie-Ag00001 Sophie-Ag00001 requested a review from a team as a code owner January 11, 2025 05:58
@BHouwens BHouwens closed this Jan 11, 2025
@BHouwens BHouwens deleted the feature/add-walletdb-attribute-mempoolnode branch January 13, 2025 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants