From 3199610ad3b93b849f2cb55a8ed3a39a32bbdffc Mon Sep 17 00:00:00 2001 From: Fabian Jahr Date: Wed, 10 Jul 2019 15:44:26 -0400 Subject: [PATCH] Place out args at the end for CreateWallet --- src/wallet/rpcwallet.cpp | 2 +- src/wallet/wallet.cpp | 2 +- src/wallet/wallet.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 87ef58ee9..b7618e125 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -2685,7 +2685,7 @@ static UniValue createwallet(const JSONRPCRequest& request) std::string error; std::string warning; WalletCreationStatus status; - std::shared_ptr wallet = CreateWallet(*g_rpc_interfaces->chain, request.params[0].get_str(), error, warning, status, passphrase, flags); + std::shared_ptr wallet = CreateWallet(*g_rpc_interfaces->chain, passphrase, flags, request.params[0].get_str(), error, warning, status); if (status == WalletCreationStatus::CREATION_FAILED) { throw JSONRPCError(RPC_WALLET_ERROR, error); } else if (status == WalletCreationStatus::ENCRYPTION_FAILED) { diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index e53b433ca..a4e3a2347 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -160,7 +160,7 @@ std::shared_ptr LoadWallet(interfaces::Chain& chain, const std::string& return LoadWallet(chain, WalletLocation(name), error, warning); } -std::shared_ptr CreateWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status, const SecureString& passphrase, uint64_t wallet_creation_flags) +std::shared_ptr CreateWallet(interfaces::Chain& chain, const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status) { // Indicate that the wallet is actually supposed to be blank and not just blank to make it encrypted bool create_blank = (wallet_creation_flags & WALLET_FLAG_BLANK_WALLET); diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 7e2230554..9db4b2c7d 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -55,7 +55,7 @@ enum WalletCreationStatus { ENCRYPTION_FAILED }; -std::shared_ptr CreateWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status, const SecureString& passphrase, uint64_t wallet_creation_flags); +std::shared_ptr CreateWallet(interfaces::Chain& chain, const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status); //! Default for -keypool static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000;