HomePhabricator

wallet: Add MakeDatabase function

Description

wallet: Add MakeDatabase function

Summary:
New function is not currently called but will be called in upcoming commits. It
moves database path checking, and existence checking, and already-loaded
checking, and verification into a single function so this logic does not need
to be repeated all over higher level wallet code, and so higher level code does
not need to change when SQLite support is added in
https://github.com/bitcoin/bitcoin/pull/19077. This also lets higher level
wallet code make fewer assumptions about the contents of wallet directories.

This commit just adds the new function and does not change behavior in any way.

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

Depends on D10224

Test Plan: ninja

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

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

Details

Provenance
Russell Yanofsky <russ@yanofsky.org>Authored on Aug 4 2020, 20:40
PiRKCommitted on Oct 5 2021, 08:47
PiRKPushed on Oct 5 2021, 08:47
Reviewer
Restricted Project
Differential Revision
D10225: wallet: Add MakeDatabase function
Parents
rABC0ae7f22b6a53: Remove WalletLocation class
Branches
Unknown
Tags
Unknown