Skip to content

Commit 3199610

Browse files
author
Fabian Jahr
committed
Place out args at the end for CreateWallet
1 parent 4fcccda commit 3199610

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2685,7 +2685,7 @@ static UniValue createwallet(const JSONRPCRequest& request)
26852685
std::string error;
26862686
std::string warning;
26872687
WalletCreationStatus status;
2688-
std::shared_ptr<CWallet> wallet = CreateWallet(*g_rpc_interfaces->chain, request.params[0].get_str(), error, warning, status, passphrase, flags);
2688+
std::shared_ptr<CWallet> wallet = CreateWallet(*g_rpc_interfaces->chain, passphrase, flags, request.params[0].get_str(), error, warning, status);
26892689
if (status == WalletCreationStatus::CREATION_FAILED) {
26902690
throw JSONRPCError(RPC_WALLET_ERROR, error);
26912691
} else if (status == WalletCreationStatus::ENCRYPTION_FAILED) {

src/wallet/wallet.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const std::string&
160160
return LoadWallet(chain, WalletLocation(name), error, warning);
161161
}
162162

163-
std::shared_ptr<CWallet> CreateWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status, const SecureString& passphrase, uint64_t wallet_creation_flags)
163+
std::shared_ptr<CWallet> CreateWallet(interfaces::Chain& chain, const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status)
164164
{
165165
// Indicate that the wallet is actually supposed to be blank and not just blank to make it encrypted
166166
bool create_blank = (wallet_creation_flags & WALLET_FLAG_BLANK_WALLET);

src/wallet/wallet.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ enum WalletCreationStatus {
5555
ENCRYPTION_FAILED
5656
};
5757

58-
std::shared_ptr<CWallet> CreateWallet(interfaces::Chain& chain, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status, const SecureString& passphrase, uint64_t wallet_creation_flags);
58+
std::shared_ptr<CWallet> CreateWallet(interfaces::Chain& chain, const SecureString& passphrase, uint64_t wallet_creation_flags, const std::string& name, std::string& error, std::string& warning, WalletCreationStatus& status);
5959

6060
//! Default for -keypool
6161
static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000;

0 commit comments

Comments
 (0)