Skip to content

Commit

Permalink
Merge #20139: Wallet: do not return warnings from UpgradeWallet()
Browse files Browse the repository at this point in the history
9636962 [upgradewallet] removed unused warning param (Sishir Giri)

Pull request description:

  The `warning` variable was unused in `upgradewallet` so I removed it

ACKs for top commit:
  practicalswift:
    ACK 9636962: diff looks correct
  MarcoFalke:
    review ACK 9636962
  jonatack:
    ACK 9636962

Tree-SHA512: 1d63186ce1e05e86a778340f2d7986c2cee1523de0a11cea39e8d148ac7ee26c49741dfa302b5c1cd1c8d74e67c1f9baee2763720c2d850b57da9a3fdce24565
  • Loading branch information
MarcoFalke committed Nov 17, 2020
2 parents 3457054 + 9636962 commit c463f70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/wallet/rpcwallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4474,10 +4474,8 @@ static RPCHelpMan upgradewallet()
if (!request.params[0].isNull()) {
version = request.params[0].get_int();
}

bilingual_str error;
std::vector<bilingual_str> warnings;
if (!pwallet->UpgradeWallet(version, error, warnings)) {
if (!pwallet->UpgradeWallet(version, error)) {
throw JSONRPCError(RPC_WALLET_ERROR, error.original);
}
UniValue obj(UniValue::VOBJ);
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4102,7 +4102,7 @@ const CAddressBookData* CWallet::FindAddressBookEntry(const CTxDestination& dest
return &address_book_it->second;
}

bool CWallet::UpgradeWallet(int version, bilingual_str& error, std::vector<bilingual_str>& warnings)
bool CWallet::UpgradeWallet(int version, bilingual_str& error)
{
int prev_version = GetVersion();
if (version == 0) {
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.h
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
};

/** Upgrade the wallet */
bool UpgradeWallet(int version, bilingual_str& error, std::vector<bilingual_str>& warnings);
bool UpgradeWallet(int version, bilingual_str& error);

//! Returns all unique ScriptPubKeyMans in m_internal_spk_managers and m_external_spk_managers
std::set<ScriptPubKeyMan*> GetActiveScriptPubKeyMans() const;
Expand Down

0 comments on commit c463f70

Please sign in to comment.