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
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
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

nakihito created this revision.Oct 15 2019, 02:26
Owners added a reviewer: Restricted Owners Package.Oct 15 2019, 02:26
Herald added a reviewer: Restricted Project. · View Herald TranscriptOct 15 2019, 02:26
nakihito planned changes to this revision.Oct 15 2019, 02:26
nakihito requested review of this revision.Oct 15 2019, 02:55
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.

nakihito updated this revision to Diff 13558.Oct 15 2019, 02:57

Fixed braces.

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
nakihito updated this revision to Diff 13595.Oct 17 2019, 18:23

Reverted constructor change for BitcoinGUI.

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