Page MenuHomePhabricator

ui: Support wallets unloaded dynamically
ClosedPublic

Authored by nakihito on Oct 15 2019, 02:26.

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rSTAGINGcde4830c698e: ui: Support wallets unloaded dynamically
rABCcde4830c698e: ui: Support wallets unloaded dynamically
Summary

Wallets unloaded dynamically will be reflected in the gui.

Partial backport of Core PR13111
https://github.com/bitcoin/bitcoin/pull/13111/commits/0ee77b20771fe34f8dbde6b16d7e2637859baec3

Reviewer note: we migrated from boost::bind to std::bind in D4133.

Depends on D4253

Test Plan
make
./bitcoin-qt
Help -> Debug -> Console
createwallet test

On the main window and the debug window you should have the multiwallet drop down menu.
Select the test wallet in the main window. Select test in the debug window.

unloadwallet

This should remove the drop down menu from both windows. Additionally the main window should should change to displaying the information for [default_wallet].

unloadwallet

The main window should no longer display any wallet information as no wallets have been loaded.

loadwallet test

The test wallet's information should be displayed in the main window.

Diff Detail

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

Event Timeline

Owners added a reviewer: Restricted Owners Package.Oct 15 2019, 02:26
nakihito added inline comments.
doc/release-notes.md
12 ↗(On Diff #13556)

Not actually part of the original PR, but there was one added for a similar change related to loadwallet.

src/qt/bitcoingui.h
135 ↗(On Diff #13556)

This change was made in D1979.
The nullptr initialization was added in D1959.

src/qt/walletmodel.cpp
397 ↗(On Diff #13556)

We migrated from boost::bind to std::bind in D4133.

jasonbcox requested changes to this revision.Oct 16 2019, 20:25
jasonbcox added inline comments.
src/qt/bitcoingui.cpp
77 ↗(On Diff #13558)

This change isn't needed due to the change pointed out by you above.

This revision now requires changes to proceed.Oct 16 2019, 20:25

Reverted constructor change for BitcoinGUI.

This revision is now accepted and ready to land.Oct 18 2019, 00:33