Page MenuHomePhabricator

wallet: Reload previously loaded wallets on GUI startup

Authored by PiRK on Sep 23 2021, 12:54.


Group Reviewers
Restricted Project
rABCc43171d5a344: wallet: Reload previously loaded wallets on GUI startup

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

Diff Detail

rABC Bitcoin ABC
Lint Not Applicable
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Sep 23 2021, 12:54
Fabien requested changes to this revision.Sep 24 2021, 18:52
Fabien added a subscriber: Fabien.
Fabien added inline comments.
3153 ↗(On Diff #30147)

You should use std::make_optional

This revision now requires changes to proceed.Sep 24 2021, 18:52
This revision is now accepted and ready to land.Mon, Sep 27, 07:28