aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-10-21 14:48:39 +0200
committerMarcoFalke <falke.marco@gmail.com>2020-10-21 14:48:43 +0200
commitb46f37ba5ec4fbd2e4c82343fc4f353d7f34837a (patch)
tree45149ee6aee512e71ca4a3bd21fa0499ae70560b
parent47fc883106fb939db0212751c2edb3d5f7430689 (diff)
parentfa4074b395a47c54069bd9f598244701505ff11d (diff)
downloadbitcoin-b46f37ba5ec4fbd2e4c82343fc4f353d7f34837a.tar.xz
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
-rw-r--r--src/wallet/wallettool.cpp3
-rwxr-xr-xtest/functional/tool_wallet.py11
2 files changed, 14 insertions, 0 deletions
diff --git a/src/wallet/wallettool.cpp b/src/wallet/wallettool.cpp
index 4452840eb1..0e18d6a740 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 3f25c58851..958341c691 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