HomePhabricator

[qt] Multiwallet support for GUI (Core PR12610)

Authored by Jonas Schnelli <dev@jonasschnelli.ch> on Mar 26 2018, 11:50.

Description

[qt] Multiwallet support for GUI (Core PR12610)

Summary:
Completes T440

Original commit messages below:

PR12610:

Merge #12610: Multiwallet for the GUI

779c5f984 Qt: hide RPCConsole wallet selector when no wallets are present (Jonas Schnelli)
dc6f150f3 Qt: show wallet name in request dlg in case of multiwallet (Jonas Schnelli)
4826ca4b8 Qt: show wallet name in send confirmation dlg in case of multiwallet (Jonas Schnelli)
cfa4133ce GUI: RPCConsole: Log wallet changes (Luke Dashjr)
b6d04fc7c Qt: Get wallet name from WalletModel rather than passing it around (Luke Dashjr)
12d8d2681 Qt: When multiple wallets are used, include in notifications the name (Jonas Schnelli)
d1ec34a76 Qt: QComboBox::setVisible doesn't work in toolbars, so defer adding it at all until needed (Luke Dashjr)
d49cc70e6 Qt: Add wallet selector to debug console (Jonas Schnelli)
d558f44c5 Bugfix: RPC: Add missing UnregisterHTTPHandler for /wallet/ (Luke Dashjr)
85d531971 Qt: Ensure UI updates only come from the currently selected walletView (Luke Dashjr)
e449f9a9e Qt: Add a combobox to toolbar to select from multiple wallets (Luke Dashjr)
3dba3c3ac Qt: Load all wallets into WalletModels (Luke Dashjr)

Pull request description:

This is an overhaul of #11383 (plus some additions).
It avoids unnecessary coupling of httpserver/jsonrpc and the wallet as well as it avoids pointer pure passing (and pointer deletion) of `CWallet` (plus other minor design changes).

Additionally it adds the wallet name to the sendconfirmation and request dialog (in case multiwallet is active)

Tree-SHA512: 3d06e18badbc5d1821e488bf1dae463bb0be544cf11b2b618e025812bfdd13c5f39604bb93b4c705313930e7dc4e66f4848b9469ba14871bade58e7a027246a1

Includes PR12795, since PR12610 introduced a bug:

Do not truncate .dat extension for wallets in gui

See https://github.com/bitcoin/bitcoin/pull/12610#issuecomment-376278677 for details

Co-authored-by: Jason B. Cox <contact@jasonbcox.com>

Test Plan:
ninja check && ninja check-functional
./src/qt/bitcoin-qt -testnet -wallet=wallet1 -wallet=wallet2
Verify the following:

  1. Visually verify that the wallet dropdown exists in the upper right-hand corner.
  2. Selecting a wallet from the dropdown displays the transactions only associated with that wallet.
  3. Requesting payment on a specified wallet generates an address for that wallet.
  4. Visually verify that Debug window now has a dropdown containing both wallet options.
  5. Selecting a particular wallet from the Debug dropdown and trying RPC commands only provides output relevant to the selected wallet (I used transaction IDs only known to one of the wallets to verify).

Reviewers: deadalnix, schancel, #bitcoin_abc, Fabien

Reviewed By: deadalnix, #bitcoin_abc, Fabien

Subscribers: Fabien, teamcity

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

Details

Committed
jasonbcoxMon, Jan 7, 05:27
Pushed
jasonbcoxMon, Jan 7, 05:27
Reviewer
Restricted Project
Differential Revision
D1979: [qt] Multiwallet support for GUI (Core PR12610)
Parents
rABC52adfb10ac25: Do not send (potentially) invalid headers in response to getheaders
Branches
Unknown
Tags
Unknown

Event Timeline

jasonbcox committed rABCf957f5b34ce8: [qt] Multiwallet support for GUI (Core PR12610) (authored by Jonas Schnelli <dev@jonasschnelli.ch>).Mon, Jan 7, 05:27