Skip to content

Commit fa30777

Browse files
MarcoFalkeknst
authored andcommitted
Merge bitcoin#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
1 parent 14121ec commit fa30777

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/wallet/wallettool.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ static void WalletShowInfo(CWallet* wallet_instance)
9999

100100
CHDChain hdChainTmp;
101101
tfm::format(std::cout, "Wallet info\n===========\n");
102+
tfm::format(std::cout, "Name: %s\n", wallet_instance->GetName());
103+
tfm::format(std::cout, "Format: %s\n", wallet_instance->GetDatabase().Format());
104+
tfm::format(std::cout, "Descriptors: %s\n", wallet_instance->IsWalletFlagSet(WALLET_FLAG_DESCRIPTORS) ? "yes" : "no");
102105
tfm::format(std::cout, "Encrypted: %s\n", wallet_instance->IsCrypted() ? "yes" : "no");
103106
tfm::format(std::cout, "HD (hd seed available): %s\n", wallet_instance->IsHDEnabled() ? "yes" : "no");
104107
tfm::format(std::cout, "Keypool Size: %u\n", wallet_instance->GetKeyPoolSize());

test/functional/tool_wallet.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ def test_tool_wallet_info(self):
100100
out = textwrap.dedent('''\
101101
Wallet info
102102
===========
103+
Name: \
104+
105+
Format: bdb
106+
Descriptors: no
103107
Encrypted: no
104108
HD (hd seed available): yes
105109
Keypool Size: 2
@@ -140,6 +144,10 @@ def test_tool_wallet_info_after_transaction(self):
140144
out = textwrap.dedent('''\
141145
Wallet info
142146
===========
147+
Name: \
148+
149+
Format: bdb
150+
Descriptors: no
143151
Encrypted: no
144152
HD (hd seed available): yes
145153
Keypool Size: 2
@@ -167,6 +175,9 @@ def test_tool_wallet_create_on_existing_wallet(self):
167175
Topping up keypool...
168176
Wallet info
169177
===========
178+
Name: foo
179+
Format: bdb
180+
Descriptors: no
170181
Encrypted: no
171182
HD (hd seed available): no
172183
Keypool Size: 1000
@@ -218,6 +229,10 @@ def test_wipe(self):
218229
out = textwrap.dedent('''\
219230
Wallet info
220231
===========
232+
Name: \
233+
234+
Format: bdb
235+
Descriptors: no
221236
Encrypted: no
222237
HD (hd seed available): yes
223238
Keypool Size: 2
@@ -231,6 +246,10 @@ def test_wipe(self):
231246
out = textwrap.dedent('''\
232247
Wallet info
233248
===========
249+
Name: \
250+
251+
Format: bdb
252+
Descriptors: no
234253
Encrypted: no
235254
HD (hd seed available): yes
236255
Keypool Size: 2

0 commit comments

Comments
 (0)