From 7d55046dfb4acc3f400bb5cf3a347eb5e734fdc8 Mon Sep 17 00:00:00 2001 From: Samuel Dobson Date: Tue, 20 Oct 2020 12:33:13 +1300 Subject: [PATCH] Merge #20125: rpc, wallet: Expose database format in getwalletinfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 test: add coverage for getwalletinfo format field (Jon Atack) 5e737a009234cbd7cf53748d3d28a2da5221192f rpc, wallet: Expose database format in getwalletinfo (João Barbosa) Pull request description: Support for sqlite based wallets was added in #19077. This PR adds the `format` key in `getwalletinfo` response, that can be `bdb` or `sqlite`. ACKs for top commit: jonatack: Tested ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 laanwj: Code review ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721. MarcoFalke: doesn't hurt ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 hebasto: ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721, tested on Linux Mint 20 (x86_64). meshcollider: utACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721 Tree-SHA512: a81f8530f040f6381d33e073a65f281993eccfa717424ab6e651c1203cbaf27794dcb7175570459e7fdaa211565bc060d0a3ecbe70d2b6f9c49b8d5071e4441c --- test/functional/wallet_descriptor.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/functional/wallet_descriptor.py b/test/functional/wallet_descriptor.py index 6aa5dc82eb9b0..f8e3c720678b2 100755 --- a/test/functional/wallet_descriptor.py +++ b/test/functional/wallet_descriptor.py @@ -22,6 +22,9 @@ 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) @@ -29,6 +32,7 @@ def run_test(self): # 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