Page MenuHomePhabricator

refactor: Move wallet methods out of chain.h and node.h
ClosedPublic

Authored by PiRK on Sep 17 2021, 08:11.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABC6523a23ee893: refactor: Move wallet methods out of chain.h and node.h
Summary

https://github.com/bitcoin/bitcoin/pull/19099/commits/e4f435047121886edb6e6a6c4e4998e44ed2e36a

Add WalletClient interface so node interface is cleaner and don't need
wallet-specific methods.

The new NodeContext::wallet_client pointer will also be needed to eliminate
global wallet variables like ::vpwallets, because createWallet(), loadWallet(),
getWallets(), etc methods called by the GUI need a way to get a reference to
the list of open wallets if it is no longer a global variable.

Also tweaks splash screen registration for load wallet events to be delayed
until after wallet client is created.

https://github.com/bitcoin-core/gui/pull/102/commits/c056064a4a93be3601a63b37afea41f8b878df79

gui: Fix SplashScreen crash when run with -disablewallet

This is a backport of core#19099 [2/3] and core-gui#102 (small bugfix)

Depends on D10141

Test Plan

ninja all check-all

Test for bugfix core-gui#102: src/qt/bitcoin-qt -disablewallet

Diff Detail

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

Event Timeline

PiRK requested review of this revision.Sep 17 2021, 08:11
Fabien requested changes to this revision.Sep 17 2021, 09:09
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/wallet/test/wallet_test_fixture.h
29 ↗(On Diff #30019)

you duplicated the wallet

This revision now requires changes to proceed.Sep 17 2021, 09:09

Remove #include <support/allocators/secure.h> from dummywallet.cpp in this commit (and not in the previous one),
fix duplicated MakeWalletClient call in wallet_test_fixture.h

This revision is now accepted and ready to land.Sep 19 2021, 04:52