HomePhabricator

Remove WalletLocation class

Description

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

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D10224

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Jul 28 2020, 23:25
PiRKCommitted on Oct 5 2021, 08:47
PiRKPushed on Oct 5 2021, 08:47
Reviewer
Restricted Project
Differential Revision
D10224: Remove WalletLocation class
Parents
rABCe854278f6db0: Add a --descriptors option to various tests
Branches
Unknown
Tags
Unknown