From fa4074b395a47c54069bd9f598244701505ff11d Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Tue, 20 Oct 2020 17:26:03 +0200 Subject: [PATCH] Show name, format and if uses descriptors in bitcoin-wallet tool --- src/wallet/wallettool.cpp | 3 +++ test/functional/tool_wallet.py | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp index 4452840eb..0e18d6a74 100644 --- a/src/wallet/wallettool.cpp +++ b/src/wallet/wallettool.cpp @@ -95,6 +95,9 @@ static void WalletShowInfo(CWallet* wallet_instance) LOCK(wallet_instance->cs_wallet); tfm::format(std::cout, "Wallet info\n===========\n"); + tfm::format(std::cout, "Name: %s\n", wallet_instance->GetName()); + tfm::format(std::cout, "Format: %s\n", wallet_instance->GetDatabase().Format()); + tfm::format(std::cout, "Descriptors: %s\n", wallet_instance->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS) ? "yes" : "no"); tfm::format(std::cout, "Encrypted: %s\n", wallet_instance->IsCrypted() ? "yes" : "no"); tfm::format(std::cout, "HD (hd seed available): %s\n", wallet_instance->IsHDEnabled() ? "yes" : "no"); tfm::format(std::cout, "Keypool Size: %u\n", wallet_instance->GetKeyPoolSize()); diff --git a/test/functional/tool_wallet.py b/test/functional/tool_wallet.py index 3f25c5885..958341c69 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -98,6 +98,10 @@ class ToolWalletTest(BitcoinTestFramework): out = textwrap.dedent('''\ Wallet info =========== + Name: \ + + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2 @@ -137,6 +141,10 @@ class ToolWalletTest(BitcoinTestFramework): out = textwrap.dedent('''\ Wallet info =========== + Name: \ + + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2 @@ -164,6 +172,9 @@ class ToolWalletTest(BitcoinTestFramework): Topping up keypool... Wallet info =========== + Name: foo + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2000