aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2021-08-30 21:04:06 -0400
committerRussell Yanofsky <russ@yanofsky.org>2021-09-16 14:17:01 -0400
commitad085f9ba15c131fc5cc77086a620f2e366aac7c (patch)
tree15ae7e775054d670ba7def6754e04e934d974383 /src/interfaces
parent6ef84e0503994c53f77093e7ea5951a7b0edea7a (diff)
downloadbitcoin-ad085f9ba15c131fc5cc77086a620f2e366aac7c.tar.xz
multiprocess: Delay wallet client construction
Delay wallet client construction until after logging, thread and other init for two reasons: - More responsive multiprocess GUI startup. When bitcoin-gui is started this moves the call from bitcoin-gui to bitcoin-node that spawns bitcoin-wallet off of the GUI event thread and onto the background GUI init executor thread. - Avoids feature_logging.py test failures with bitcoin-node by making bitcoin-wallet logging start after bitcoin-node logging starts, because the tests are not written to handle the bitcoin-wallet logging init code running first. This partially reverts commit b266b3e0bf29d0f3d5deaeec62d57c5025b35525, moving wallet client creation back to the place it was located before.
Diffstat (limited to 'src/interfaces')
-rw-r--r--src/interfaces/node.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/interfaces/node.h b/src/interfaces/node.h
index 770b1b8753..ee941b4602 100644
--- a/src/interfaces/node.h
+++ b/src/interfaces/node.h
@@ -197,6 +197,10 @@ public:
using ShowProgressFn = std::function<void(const std::string& title, int progress, bool resume_possible)>;
virtual std::unique_ptr<Handler> handleShowProgress(ShowProgressFn fn) = 0;
+ //! Register handler for wallet client constructed messages.
+ using InitWalletFn = std::function<void()>;
+ virtual std::unique_ptr<Handler> handleInitWallet(InitWalletFn fn) = 0;
+
//! Register handler for number of connections changed messages.
using NotifyNumConnectionsChangedFn = std::function<void(int new_num_connections)>;
virtual std::unique_ptr<Handler> handleNotifyNumConnectionsChanged(NotifyNumConnectionsChangedFn fn) = 0;