wallet, rpc, gui: List legacy wallets with a message about migration #32619

pull achow101 wants to merge 2 commits into bitcoin:master from achow101:dont-list-legacy-wallets changing 4 files +24 −6
  1. achow101 commented at 8:27 pm on May 26, 2025: member

    A new field warnings is added for each wallet in listwalletdir. If a legacy wallet is detected, the warning will contain a message that the wallet is a legacy wallet and will need to be migrated before it can be loaded.

    In the GUI, the “Open Wallet” menu is changed to show legacy wallets greyed out with “(needs migration)” appended to their name to indicate to the user that the legacy wallet will need to be migrated.

  2. DrahtBot commented at 8:27 pm on May 26, 2025: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Code Coverage & Benchmarks

    For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/32619.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK maflcko, furszy, w0xlt, adyshimony

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

  3. in test/functional/wallet_migration.py:556 in 6f81f27223 outdated
    552@@ -548,7 +553,7 @@ def test_default_wallet(self):
    553         assert_equal(info["format"], "sqlite")
    554 
    555         walletdir_list = wallet.listwalletdir()
    556-        assert {"name": info["walletname"]} in walletdir_list["wallets"]
    557+        assert {"name": info["walletname"]} in [{"name": w["name"]} for w in walletdir_list["wallets"]]
    


    jonatack commented at 9:20 pm on May 26, 2025:

    I also needed to change this to make wallet_multiwallet.py pass:

     0--- a/test/functional/wallet_multiwallet.py
     1+++ b/test/functional/wallet_multiwallet.py
     2@@ -72,7 +72,7 @@ class MultiWalletTest(BitcoinTestFramework):
     3                 return wallet_dir(name, "wallet.dat")
     4             return wallet_dir(name)
     5 
     6-        assert_equal(self.nodes[0].listwalletdir(), {'wallets': [{'name': self.default_wallet_name}]})
     7+        assert_equal(self.nodes[0].listwalletdir(), {'wallets': [{'name': self.default_wallet_name, 'warnings': []}]})
     8 
     9         # check wallet.dat is created
    10         self.stop_nodes()
    

    achow101 commented at 10:14 pm on May 26, 2025:
    Indeed, done.
  4. DrahtBot added the label CI failed on May 26, 2025
  5. wallet, rpc: Give warning in listwalletdir for legacy wallets 09955172f3
  6. gui: Disallow loading legacy wallets
    Instead of allowing users to load a legacy wallet from the "Open Wallet"
    menu, show the legacy wallet greyed out with a message that the wallet
    needs to be migrated.
    f3a444c45f
  7. achow101 force-pushed on May 26, 2025
  8. DrahtBot removed the label CI failed on May 26, 2025
  9. maflcko commented at 6:09 am on May 27, 2025: member
    lgtm ACK f3a444c45fb4bf4e51d53ebf1cf4c2631ded481c
  10. furszy commented at 7:39 am on May 27, 2025: member
    Code review ACK f3a444c45fb4bf4e51d53ebf1cf4c2631ded481c
  11. adyshimony commented at 9:38 pm on May 27, 2025: none

    Test ACK f3a444c

    listwalletdir:

     0bitcoin-cli listwalletdir
     1{
     2  "wallets": [
     3    {
     4      "name": "legacy_0.15_ver",
     5      "warnings": [
     6        "This wallet is a legacy wallet and will need to be migrated with migratewallet before it can be loaded"
     7      ]
     8    },
     9    {
    10      "name": "test_32597_wallet",
    11      "warnings": [
    12      ]
    13    }
    14  ]
    15}
    

    QT “Open Wallet” menu:

    image

    image

  12. w0xlt commented at 10:25 pm on May 27, 2025: contributor
  13. fanquake merged this on May 30, 2025
  14. fanquake closed this on May 30, 2025


github-metadata-mirror

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: 2025-06-12 21:13 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me