Skip to content

Commit

Permalink
Merge bitcoin#20198: Show name, format and if uses descriptors in bit…
Browse files Browse the repository at this point in the history
…coin-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
  • Loading branch information
MarcoFalke authored and knst committed Mar 6, 2024
1 parent 14121ec commit fa30777
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wallet/wallettool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
19 changes: 19 additions & 0 deletions test/functional/tool_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit fa30777

Please sign in to comment.