Skip to content

Commit

Permalink
Show name, format and if uses descriptors in bitcoin-wallet tool
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli committed Oct 21, 2020
1 parent f5bd46a commit fa4074b
Show file tree
Hide file tree
Showing 2 changed files with 14 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 @@ -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());
Expand Down
11 changes: 11 additions & 0 deletions test/functional/tool_wallet.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,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 @@ -137,6 +141,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 @@ -164,6 +172,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): yes
Keypool Size: 2000
Expand Down

0 comments on commit fa4074b

Please sign in to comment.