Skip to content

Commit

Permalink
Merge bitcoin#20125: rpc, wallet: Expose database format in getwallet…
Browse files Browse the repository at this point in the history
…info

624bab0 test: add coverage for getwalletinfo format field (Jon Atack)
5e737a0 rpc, wallet: Expose database format in getwalletinfo (João Barbosa)

Pull request description:

  Support for sqlite based wallets was added in bitcoin#19077. This PR adds the `format` key in `getwalletinfo` response, that can be `bdb` or  `sqlite`.

ACKs for top commit:
  jonatack:
    Tested ACK 624bab0
  laanwj:
    Code review ACK 624bab0.
  MarcoFalke:
    doesn't hurt ACK 624bab0
  hebasto:
    ACK 624bab0, tested on Linux Mint 20 (x86_64).
  meshcollider:
    utACK 624bab0

Tree-SHA512: a81f8530f040f6381d33e073a65f281993eccfa717424ab6e651c1203cbaf27794dcb7175570459e7fdaa211565bc060d0a3ecbe70d2b6f9c49b8d5071e4441c
  • Loading branch information
meshcollider authored and knst committed Mar 6, 2024
1 parent 343d4b0 commit 7d55046
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/functional/wallet_descriptor.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,17 @@ def skip_test_if_missing_module(self):
self.skip_if_no_wallet()

def run_test(self):
wallet_info = self.nodes[0].getwalletinfo()
assert_equal(wallet_info['format'], 'bdb')

# Make a descriptor wallet
self.log.info("Making a descriptor wallet")
self.nodes[0].createwallet(wallet_name="desc1", descriptors=True)

# A descriptor wallet should have 100 addresses * 1 type = 100 keys
self.log.info("Checking wallet info")
wallet_info = self.nodes[0].getwalletinfo()
assert_equal(wallet_info['format'], 'sqlite')
assert_equal(wallet_info['keypoolsize'], 100)
assert_equal(wallet_info['keypoolsize_hd_internal'], 100)
assert 'keypoololdest' not in wallet_info
Expand Down

0 comments on commit 7d55046

Please sign in to comment.