Skip to content

Commit

Permalink
wallet: Fix error messages telling user to specify wallet
Browse files Browse the repository at this point in the history
It is not clear which file was meant here.
  • Loading branch information
mzumsande committed Sep 16, 2024
1 parent c38e999 commit 4b1935e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/bitcoin-cli.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ static void ParseError(const UniValue& error, std::string& strPrint, int& nRet)
strPrint += ("error message:\n" + err_msg.get_str());
}
if (err_code.isNum() && err_code.getInt<int>() == RPC_WALLET_NOT_SPECIFIED) {
strPrint += "\nTry adding \"-rpcwallet=<filename>\" option to bitcoin-cli command line.";
strPrint += "\nTry adding \"-rpcwallet=<walletname>\" option to bitcoin-cli command line.";
}
} else {
strPrint = "error: " + error.write();
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/rpc/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ std::shared_ptr<CWallet> GetWalletForJSONRPCRequest(const JSONRPCRequest& reques
RPC_WALLET_NOT_FOUND, "No wallet is loaded. Load a wallet using loadwallet or create a new one with createwallet. (Note: A default wallet is no longer automatically created)");
}
throw JSONRPCError(RPC_WALLET_NOT_SPECIFIED,
"Wallet file not specified (must request wallet RPC through /wallet/<filename> uri-path).");
"Wallet file not specified (must request wallet RPC through /wallet/<walletname> uri-path).");
}

void EnsureWalletIsUnlocked(const CWallet& wallet)
Expand Down

0 comments on commit 4b1935e

Please sign in to comment.