Skip to content

Conversation

@Sophie-Ag00001
Copy link
Collaborator

## Summary
This PR adds a `WalletDb` instance to the `MempoolNode` struct, mirroring the implementation in the miner. The changes include:
1. Adding a `wallet_db: WalletDb` field to the `MempoolNode` struct.
2. Initializing `wallet_db` in the `MempoolNode::new()` function.
3. Including `wallet_db` in the struct initialization.

## Motivation
The addition of `WalletDb` to `MempoolNode` enables wallet-related operations within the mempool node, ensuring consistency with the miner's functionality. This integration is essential for handling wallet data and transactions in the mempool context.

## Context
The changes are part of a broader effort to unify wallet database handling across different components of the system. By adding `WalletDb` to `MempoolNode`, we ensure that the mempool node can manage wallet data seamlessly, similar to the miner.

## Testing
To test the changes:
1. Ensure the mempool node initializes correctly with the new `WalletDb` field.
2. Verify that wallet-related operations (e.g., transaction handling) function as expected within the mempool node.
3. Check for any regressions in existing mempool functionality.

## Known Issues/Limitations
- None identified at this time. The changes are additive and do not modify existing code.

1. Add wallet_db: WalletDb to MempoolNode struct (alongside other fields)
2. In MempoolNode::new(), add this block before creating the node:
let wallet_db = WalletDb::new(
    config.mempool_db_mode,
    extra.wallet_db.take(),
    config.passphrase,
    extra.custom_wallet_spec,
)?;
3. Add wallet_db, to the struct initialization

Do NOT remove or modify any existing code. Only add these three pieces
@Sophie-Ag00001 Sophie-Ag00001 requested a review from a team as a code owner January 11, 2025 04:08
@BHouwens BHouwens closed this Jan 12, 2025
@BHouwens BHouwens deleted the feature/add-walletdb-mempoolnode-miner branch January 12, 2025 05:45
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