Skip to content

Refractor WalletRuntime load to Combine wallet DB dir setup and config loading into one function - #319

Open
emma31-dev wants to merge 1 commit into
bitcoindevkit:masterfrom
emma31-dev:walletruntimeconfigrefractor
Open

Refractor WalletRuntime load to Combine wallet DB dir setup and config loading into one function#319
emma31-dev wants to merge 1 commit into
bitcoindevkit:masterfrom
emma31-dev:walletruntimeconfigrefractor

Conversation

@emma31-dev

@emma31-dev emma31-dev commented Sep 5, 2026

Copy link
Copy Markdown

Description

Merges prepare_wallet_db_dir and load_wallet_config into a single prepare_wallet_db_dir_and_config function that returns the database path alongside WalletOpts and Network.

The two functions were always called together in WalletRuntime::load, so combining them removes the duplication and simplifies the call site.

Notes to the reviewers

The main reason for this change is because the two functions merged were single-use.

Checklists

All Submissions:

  • I've signed all my commits
  • I followed the contribution guidelines
  • I ran cargo fmt and cargo clippy before committing

Thank you.

@emma31-dev
emma31-dev force-pushed the walletruntimeconfigrefractor branch from 1565f0a to dbae612 Compare September 5, 2026 17:59
Combine `prepare_wallet_db_dir` and `load_wallet_config` into a single
function that returns the database path alongside wallet options and
network, reducing code duplication in the `WalletRuntime` loader.

Signed-off-by: emma31-dev <emmanuelfidel07@gmail.com>
@emma31-dev
emma31-dev force-pushed the walletruntimeconfigrefractor branch from dbae612 to 2bdeb3d Compare September 5, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant