Page MenuHomePhabricator

Remove WalletLocation class
ClosedPublic

Authored by PiRK on Sep 30 2021, 13:28.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC0ae7f22b6a53: Remove WalletLocation class
Summary

PR description:

Get rid of file path handling in wallet application code and move it down to database layer.

There is no change in behavior except for some changed error messages.

Motivation for this change is to make code more understandable, but also to prepare for adding SQLite support in #19077 so SQLite implementation can be contained at the database layer and wallet loading code does not need to become more complicated.

This removes a source of complexity and indirection that makes it harder to
understand path checking code. Path checks will be simplified in upcoming
commits.

There is no change in behavior in this commit other than a slightly more
descriptive error message in loadwallet if the default "" wallet can't be
found. (The error message is improved more in upcoming commit "wallet: Remove
path checking code from loadwallet RPC".)

This is a backport of core#19619 [1/8]
https://github.com/bitcoin/bitcoin/pull/19619/commits/288b4ffb6b291f0466d513ff3c40af6758ca7c88

Test Plan

ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Sep 30 2021, 13:28
PiRK edited the summary of this revision. (Show Details)
Fabien requested changes to this revision.Sep 30 2021, 20:47
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/wallet/rpcwallet.cpp
3152 ↗(On Diff #30234)

revert

This revision now requires changes to proceed.Sep 30 2021, 20:47

fix rebase accident (revert to std::optional to std::make_optional))

This revision is now accepted and ready to land.Oct 1 2021, 08:11
This revision was automatically updated to reflect the committed changes.