Support for sqlite based wallets was added in #19077. This PR adds the format key in getwalletinfo response, that can be bdb or sqlite.
rpc, wallet: Expose database format in getwalletinfo #20125
pull promag wants to merge 2 commits into bitcoin:master from promag:2020-10-walletinfoformat changing 7 files +13 −2-
promag commented at 10:26 PM on October 11, 2020: member
- fanquake added the label Wallet on Oct 11, 2020
-
DrahtBot commented at 6:31 AM on October 12, 2020: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #18904 (Don't call lsn_reset in periodic flush by bvbfan)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
achow101 commented at 3:04 PM on October 12, 2020: member
Concept ACK
- hebasto approved
-
hebasto commented at 3:49 PM on October 12, 2020: member
Approach ACK 56e1b81ef8efdcfe26b6fe22fea5354952afcead
Mind making the new
Formatmember functionconst? -
promag commented at 3:52 PM on October 12, 2020: member
Mind making the new
Formatmember functionconst? @ryanofsky fine by you? -
rpc, wallet: Expose database format in getwalletinfo 5e737a0092
- promag force-pushed on Oct 14, 2020
-
jonatack commented at 10:38 PM on October 14, 2020: member
Tested ACK modulo test coverage
RPC results
$ ./src/bitcoin-cli -rpcwallet= getwalletinfo { "walletname": "", "walletversion": 169900, "format": "bdb", ...$ ./src/bitcoin-cli -rpcwallet=sqlite getwalletinfo { "walletname": "sqlite", "walletversion": 169900, "format": "sqlite", ...help
Result: { (json object) "walletname" : "str", (string) the wallet name "walletversion" : n, (numeric) the wallet version "format" : "str", (string) the database format (bdb or sqlite) ... - promag marked this as ready for review on Oct 15, 2020
- promag force-pushed on Oct 15, 2020
-
promag commented at 2:20 PM on October 15, 2020: member
Rebased.
-
test: add coverage for getwalletinfo format field 624bab00dd
-
jonatack commented at 2:49 PM on October 15, 2020: member
Test coverage commit at https://github.com/jonatack/bitcoin/commits/test-getwalletinfo-format-field, feel free to pull in or use.
- promag force-pushed on Oct 15, 2020
-
jonatack commented at 3:14 PM on October 15, 2020: member
Will need a release note here or added manually in https://github.com/bitcoin-core/bitcoin-devwiki/wiki.
- hebasto approved
-
hebasto commented at 4:35 PM on October 15, 2020: member
ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721, tested on Linux Mint 20 (x86_64).
Tested in the GUI console :)
Mind making the new
Formatmember functionconst?@ryanofsky fine by you?
Didn't get what are concerns. :smiley:
-
promag commented at 4:46 PM on October 15, 2020: member
He previously said that he dislikes interfaces that enforce const. Probably not relevant in this case.
- laanwj added this to the milestone 0.21.0 on Oct 15, 2020
-
in src/wallet/rpcwallet.cpp:2469 in 624bab00dd
2465 | @@ -2465,6 +2466,7 @@ static RPCHelpMan getwalletinfo() 2466 | int64_t kp_oldest = pwallet->GetOldestKeyPoolTime(); 2467 | obj.pushKV("walletname", pwallet->GetName()); 2468 | obj.pushKV("walletversion", pwallet->GetVersion()); 2469 | + obj.pushKV("format", pwallet->GetDatabase().Format());
jonatack commented at 7:38 PM on October 15, 2020:Not sure, since it is related to the "descriptors" bool field, maybe place "format" at the end right after "descriptors". IDK.
laanwj commented at 9:52 AM on October 16, 2020: memberI think this information is mildly useful for troubleshooting user issues, and for testing. Code review ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721.
MarcoFalke commented at 9:56 AM on October 16, 2020: memberHow would it be possible to have a legacy-sqlite wallet or a descriptor-bdb wallet? This should only be useful for developers that ran master?
MarcoFalke commented at 9:58 AM on October 16, 2020: memberNo objection obviously.
doesn't hurt ACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721
meshcollider commented at 10:50 PM on October 19, 2020: contributorutACK 624bab00dd2cc8e2ebd77dc0a669bc8d507c3721
meshcollider merged this on Oct 19, 2020meshcollider closed this on Oct 19, 2020promag deleted the branch on Oct 19, 2020sidhujag referenced this in commit b01329c2ec on Oct 19, 2020DrahtBot locked this on Feb 15, 2022LabelsMilestone
0.21.0
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-26 18:14 UTC
More mirrored repositories can be found on mirror.b10c.me