mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-08-24 10:21:22 +02:00
wallet: Remove GetVersion()
This commit is contained in:
@@ -40,7 +40,7 @@ static RPCHelpMan getwalletinfo()
|
||||
{
|
||||
{
|
||||
{RPCResult::Type::STR, "walletname", "the wallet name"},
|
||||
{RPCResult::Type::NUM, "walletversion", "the wallet version"},
|
||||
{RPCResult::Type::NUM, "walletversion", "(DEPRECATED) only related to unsupported legacy wallet, returns the latest version 169900 for backwards compatibility"},
|
||||
{RPCResult::Type::STR, "format", "the database format (only sqlite)"},
|
||||
{RPCResult::Type::NUM, "txcount", "the total number of transactions in the wallet"},
|
||||
{RPCResult::Type::NUM, "keypoolsize", "how many new keys are pre-generated (only counts external keys)"},
|
||||
@@ -82,9 +82,11 @@ static RPCHelpMan getwalletinfo()
|
||||
|
||||
UniValue obj(UniValue::VOBJ);
|
||||
|
||||
const int latest_legacy_wallet_minversion{169900};
|
||||
|
||||
size_t kpExternalSize = pwallet->KeypoolCountExternalKeys();
|
||||
obj.pushKV("walletname", pwallet->GetName());
|
||||
obj.pushKV("walletversion", pwallet->GetVersion());
|
||||
obj.pushKV("walletversion", latest_legacy_wallet_minversion);
|
||||
obj.pushKV("format", pwallet->GetDatabase().Format());
|
||||
obj.pushKV("txcount", (int)pwallet->mapWallet.size());
|
||||
obj.pushKV("keypoolsize", (int64_t)kpExternalSize);
|
||||
|
@@ -828,9 +828,6 @@ public:
|
||||
//! signify that a particular wallet feature is now used.
|
||||
void SetMinVersion(enum WalletFeature, WalletBatch* batch_in = nullptr) override;
|
||||
|
||||
//! get the current wallet format (the oldest client version guaranteed to understand this wallet)
|
||||
int GetVersion() const { LOCK(cs_wallet); return nWalletVersion; }
|
||||
|
||||
//! Get wallet transactions that conflict with given transaction (spend same outputs)
|
||||
std::set<Txid> GetConflicts(const Txid& txid) const EXCLUSIVE_LOCKS_REQUIRED(cs_wallet);
|
||||
|
||||
|
Reference in New Issue
Block a user