aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2018-04-08 14:37:50 -0400
committerRussell Yanofsky <russ@yanofsky.org>2019-02-22 15:43:02 -0400
commit1106a6fde4bfde31a16de45e4cc84ed5da05c5a4 (patch)
tree7d8168d42ef198f19f5f200833d22c77a6b0c86d /src/wallet
parent318f41fb2cae0a46b4e4be49156562b8ed640f0c (diff)
Remove use of uiInterface.LoadWallet in wallet code
This also changes the uiInterface.LoadWallet signal argument type from shared_ptr<CWallet> to unique_ptr<interfaces::Wallet> because CWallet is an internal wallet class that shouldn't be used in non-wallet code (and also can't be passed across process boundaries). This commit does not change behavior.
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp
index fb4bd8811f..3d64adec53 100644
--- a/src/wallet/wallet.cpp
+++ b/src/wallet/wallet.cpp
@@ -12,6 +12,7 @@
#include <consensus/validation.h>
#include <fs.h>
#include <interfaces/chain.h>
+#include <interfaces/wallet.h>
#include <key.h>
#include <key_io.h>
#include <keystore.h>
@@ -4391,7 +4392,7 @@ std::shared_ptr<CWallet> CWallet::CreateWalletFromFile(interfaces::Chain& chain,
}
}
- uiInterface.LoadWallet(walletInstance);
+ chain.loadWallet(interfaces::MakeWallet(walletInstance));
// Register with the validation interface. It's ok to do this after rescan since we're still holding cs_main.
RegisterValidationInterface(walletInstance.get());