Place out args at the end for CreateWallet

This commit is contained in:
Fabian Jahr 2019-07-10 15:44:26 -04:00
parent 4fcccdac78
commit 3199610ad3
3 changed files with 3 additions and 3 deletions

View file

@ -2685,7 +2685,7 @@ static UniValue createwallet(const JSONRPCRequest& request)
std::string error;
std::string warning;
WalletCreationStatus status;
std::shared_ptr<CWallet> wallet = CreateWallet(*g_rpc_interfaces->chain, request.params[0].get_str(), error, warning, status, passphrase, flags);
std::shared_ptr<CWallet> 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) {

View file

@ -160,7 +160,7 @@ std::shared_ptr<CWallet> LoadWallet(interfaces::Chain& chain, const std::string&
return LoadWallet(chain, WalletLocation(name), error, warning);
}
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)
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)
{
// 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);

View file

@ -55,7 +55,7 @@ enum WalletCreationStatus {
ENCRYPTION_FAILED
};
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);
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);
//! Default for -keypool
static const unsigned int DEFAULT_KEYPOOL_SIZE = 1000;