HomePhabricator

wallet: Reload previously loaded wallets on GUI startup

Description

wallet: Reload previously loaded wallets on GUI startup

Summary:

Enable the GUI to also use the load_on_startup feature.
Wallets loaded in the GUI always have load_on_startup=true.
When they are unloaded from the GUI, load_on_startup=false.

To facilitate this change, UpdateWalletSetting is moved into the wallet
module and called from within LoadWallet, RemoveWallet, and
Createwallet. This change does not actually touch the GUI code but
rather the wallet functions that are shared between the GUI and RPC.

This is a backport of core#19754
Depends on D10185

Note: std::optional works a bit differently than core's Optional, so I had to account for a couple of changes in wallet.cpp::UpdateWalletSetting.
See :

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

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

Details

Provenance
Andrew Chow <achow101-github@achow101.com>Authored on Aug 17 2020, 19:21
PiRKCommitted on Sep 27 2021, 12:58
PiRKPushed on Sep 27 2021, 12:58
Reviewer
Restricted Project
Differential Revision
D10189: wallet: Reload previously loaded wallets on GUI startup
Parents
rABC62bae4b8a97f: Add loadwallet and createwallet RPC load_on_startup options
Branches
Unknown
Tags
Unknown