Skip to content

Commit b46f37b

Browse files
author
MarcoFalke
committed
Merge #20198: Show name, format and if uses descriptors in bitcoin-wallet tool
fa4074b Show name, format and if uses descriptors in bitcoin-wallet tool (Jonas Schnelli) Pull request description: ACKs for top commit: MarcoFalke: ACK fa4074b jonatack: re-ACK fa4074b Tree-SHA512: cf6ee96ff21532fc4b0ba7a0fdfdc1fa485c9b1495447350fe65cd0bd919e0e0280613933265cdee069b8c29ccf015ac374535a70cac3d4fb89f4d08b3a03519
2 parents 47fc883 + fa4074b commit b46f37b

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/wallet/wallettool.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,9 @@ static void WalletShowInfo(CWallet* wallet_instance)
9595
LOCK(wallet_instance->cs_wallet);
9696

9797
tfm::format(std::cout, "Wallet info\n===========\n");
98+
tfm::format(std::cout, "Name: %s\n", wallet_instance->GetName());
99+
tfm::format(std::cout, "Format: %s\n", wallet_instance->GetDatabase().Format());
100+
tfm::format(std::cout, "Descriptors: %s\n", wallet_instance->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS) ? "yes" : "no");
98101
tfm::format(std::cout, "Encrypted: %s\n", wallet_instance->IsCrypted() ? "yes" : "no");
99102
tfm::format(std::cout, "HD (hd seed available): %s\n", wallet_instance->IsHDEnabled() ? "yes" : "no");
100103
tfm::format(std::cout, "Keypool Size: %u\n", wallet_instance->GetKeyPoolSize());

test/functional/tool_wallet.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ def test_tool_wallet_info(self):
9898
out = textwrap.dedent('''\
9999
Wallet info
100100
===========
101+
Name: \
102+
103+
Format: bdb
104+
Descriptors: no
101105
Encrypted: no
102106
HD (hd seed available): yes
103107
Keypool Size: 2
@@ -137,6 +141,10 @@ def test_tool_wallet_info_after_transaction(self):
137141
out = textwrap.dedent('''\
138142
Wallet info
139143
===========
144+
Name: \
145+
146+
Format: bdb
147+
Descriptors: no
140148
Encrypted: no
141149
HD (hd seed available): yes
142150
Keypool Size: 2
@@ -164,6 +172,9 @@ def test_tool_wallet_create_on_existing_wallet(self):
164172
Topping up keypool...
165173
Wallet info
166174
===========
175+
Name: foo
176+
Format: bdb
177+
Descriptors: no
167178
Encrypted: no
168179
HD (hd seed available): yes
169180
Keypool Size: 2000

0 commit comments

Comments
 (0)