From fa3077749480aef26ba626f81a0d025215fbbf9c Mon Sep 17 00:00:00 2001 From: MarcoFalke Date: Wed, 21 Oct 2020 14:48:39 +0200 Subject: [PATCH] Merge #20198: Show name, format and if uses descriptors in bitcoin-wallet tool fa4074b395a47c54069bd9f598244701505ff11d Show name, format and if uses descriptors in bitcoin-wallet tool (Jonas Schnelli) Pull request description: ACKs for top commit: MarcoFalke: ACK fa4074b395a47c54069bd9f598244701505ff11d jonatack: re-ACK fa4074b395a47c54069bd9f598244701505ff11d Tree-SHA512: cf6ee96ff21532fc4b0ba7a0fdfdc1fa485c9b1495447350fe65cd0bd919e0e0280613933265cdee069b8c29ccf015ac374535a70cac3d4fb89f4d08b3a03519 --- src/wallet/wallettool.cpp | 3 +++ test/functional/tool_wallet.py | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp index febcdbe27286d..c7af1d56f3b2d 100644 --- a/src/wallet/wallettool.cpp +++ b/src/wallet/wallettool.cpp @@ -99,6 +99,9 @@ static void WalletShowInfo(CWallet* wallet_instance) CHDChain hdChainTmp; 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 d82fee2a0ad19..f804a6c4b45f0 100755 --- a/test/functional/tool_wallet.py +++ b/test/functional/tool_wallet.py @@ -100,6 +100,10 @@ def test_tool_wallet_info(self): out = textwrap.dedent('''\ Wallet info =========== + Name: \ + + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2 @@ -140,6 +144,10 @@ def test_tool_wallet_info_after_transaction(self): out = textwrap.dedent('''\ Wallet info =========== + Name: \ + + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2 @@ -167,6 +175,9 @@ def test_tool_wallet_create_on_existing_wallet(self): Topping up keypool... Wallet info =========== + Name: foo + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): no Keypool Size: 1000 @@ -218,6 +229,10 @@ def test_wipe(self): out = textwrap.dedent('''\ Wallet info =========== + Name: \ + + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2 @@ -231,6 +246,10 @@ def test_wipe(self): out = textwrap.dedent('''\ Wallet info =========== + Name: \ + + Format: bdb + Descriptors: no Encrypted: no HD (hd seed available): yes Keypool Size: 2