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

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--006a51241073e994b41acfe9ec718e94-->

    Code Coverage & Benchmarks

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

    <!--021abf342d371248e50ceaed478a90ca-->

    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.

    <!--5faf32d7da4f0f540f40219e4f7537a3-->

  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:

    --- a/test/functional/wallet_multiwallet.py
    +++ b/test/functional/wallet_multiwallet.py
    @@ -72,7 +72,7 @@ class MultiWalletTest(BitcoinTestFramework):
                     return wallet_dir(name, "wallet.dat")
                 return wallet_dir(name)
     
    -        assert_equal(self.nodes[0].listwalletdir(), {'wallets': [{'name': self.default_wallet_name}]})
    +        assert_equal(self.nodes[0].listwalletdir(), {'wallets': [{'name': self.default_wallet_name, 'warnings': []}]})
     
             # check wallet.dat is created
             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

    <details><summary>Details</summary> <p>

    listwalletdir:

    bitcoin-cli listwalletdir
    {
      "wallets": [
        {
          "name": "legacy_0.15_ver",
          "warnings": [
            "This wallet is a legacy wallet and will need to be migrated with migratewallet before it can be loaded"
          ]
        },
        {
          "name": "test_32597_wallet",
          "warnings": [
          ]
        }
      ]
    }
    
    
    

    QT "Open Wallet" menu:

    image

    image

    </p> </details>

  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

  15. sedited referenced this in commit f236a50dc1 on Jun 14, 2025
  16. yuvicc referenced this in commit 069643f094 on Jul 6, 2025
  17. yuvicc referenced this in commit 22f55cf11d on Aug 26, 2025
  18. bug-castercv502 referenced this in commit cfdba67027 on Sep 28, 2025
  19. stickies-v referenced this in commit a19c56cd7c on Nov 4, 2025
  20. Kino1994 referenced this in commit 5b561384af on Jun 28, 2026
  21. BigcoinBGC referenced this in commit a65347c381 on Jun 30, 2026
  22. bitcoin locked this on Jul 30, 2026

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: 2026-08-19 11:51 UTC

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