aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/init.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-05-30 15:55:17 -0400
committerRussell Yanofsky <russ@yanofsky.org>2018-11-06 11:44:40 -0400
commit8db11dd0b182a93042899651545cc21b34bf0742 (patch)
tree8165f7a88f2f56cca4d152c5e4fc0d2e5743bc54 /src/wallet/init.cpp
parent7e2e62cf7c513bd7d8e784069c5534fda1c50c52 (diff)
downloadbitcoin-8db11dd0b182a93042899651545cc21b34bf0742.tar.xz
Pass chain and client variables where needed
This commit does not change behavior. All it does is pass new function parameters. It is easiest to review this change with: git log -p -n1 -U0 --word-diff-regex=.
Diffstat (limited to 'src/wallet/init.cpp')
-rw-r--r--src/wallet/init.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/wallet/init.cpp b/src/wallet/init.cpp
index 456422d004..5ae9304904 100644
--- a/src/wallet/init.cpp
+++ b/src/wallet/init.cpp
@@ -34,10 +34,10 @@ public:
//! Responsible for reading and validating the -wallet arguments and verifying the wallet database.
// This function will perform salvage on the wallet if requested, as long as only one wallet is
// being loaded (WalletParameterInteraction forbids -salvagewallet, -zapwallettxes or -upgradewallet with multiwallet).
- bool Verify() const override;
+ bool Verify(interfaces::Chain& chain) const override;
//! Load wallet databases.
- bool Open() const override;
+ bool Open(interfaces::Chain& chain) const override;
//! Complete startup of wallets.
void Start(CScheduler& scheduler) const override;
@@ -174,7 +174,7 @@ void WalletInit::RegisterRPC(CRPCTable &t) const
RegisterWalletRPCCommands(t);
}
-bool WalletInit::Verify() const
+bool WalletInit::Verify(interfaces::Chain& chain) const
{
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
return true;
@@ -219,7 +219,7 @@ bool WalletInit::Verify() const
std::string error_string;
std::string warning_string;
- bool verify_success = CWallet::Verify(location, salvage_wallet, error_string, warning_string);
+ bool verify_success = CWallet::Verify(chain, location, salvage_wallet, error_string, warning_string);
if (!error_string.empty()) InitError(error_string);
if (!warning_string.empty()) InitWarning(warning_string);
if (!verify_success) return false;
@@ -228,7 +228,7 @@ bool WalletInit::Verify() const
return true;
}
-bool WalletInit::Open() const
+bool WalletInit::Open(interfaces::Chain& chain) const
{
if (gArgs.GetBoolArg("-disablewallet", DEFAULT_DISABLE_WALLET)) {
LogPrintf("Wallet disabled!\n");
@@ -236,7 +236,7 @@ bool WalletInit::Open() const
}
for (const std::string& walletFile : gArgs.GetArgs("-wallet")) {
- std::shared_ptr<CWallet> pwallet = CWallet::CreateWalletFromFile(WalletLocation(walletFile));
+ std::shared_ptr<CWallet> pwallet = CWallet::CreateWalletFromFile(chain, WalletLocation(walletFile));
if (!pwallet) {
return false;
}