Calling `upgradewallet` on a legacy wallet causes Bitcoin Core to crash #23610

issue benthecarman opened this issue on November 26, 2021
  1. benthecarman commented at 11:40 PM on November 26, 2021: contributor

    I have 2 legacy wallets and on both if I run upgradewallet it will cause bitcoin core to crash. This should just return me an error string

    Currenl result from getwalletinfo:

    {
      "walletname": "Wallet",
      "walletversion": 169900,
      "format": "bdb",
      "balance": 0.00000000,
      "unconfirmed_balance": 0.00000000,
      "immature_balance": 0.00000000,
      "txcount": 80,
      "keypoololdest": 1613078825,
      "keypoolsize": 941,
      "keypoolsize_hd_internal": 941,
      "paytxfee": 0.00000000,
      "private_keys_enabled": false,
      "avoid_reuse": true,
      "scanning": false,
      "descriptors": false
    }
    
  2. benthecarman added the label Bug on Nov 26, 2021
  3. MarcoFalke commented at 8:39 AM on November 27, 2021: member

    Can you run this in valgrind or gdb to get a stack trace? Also, which version of Bitcoin Core?

  4. MarcoFalke added the label Wallet on Nov 27, 2021
  5. benthecarman commented at 9:16 AM on November 27, 2021: contributor

    Can you run this in valgrind or gdb to get a stack trace? Also, which version of Bitcoin Core?

    version is 22.0

  6. fanquake deleted a comment on Nov 28, 2021
  7. achow101 commented at 10:08 PM on December 15, 2021: member

    Do you have a backup of the wallets? If so, can you load them and do getwalletinfo?

    Is there anything in the debug.log that contains an error message?


    Oh, this is probably because the wallet has private keys disabled but upgradewallet isn't checking that so it tries to generate keys, but hits an assertion error.

  8. benthecarman commented at 4:14 PM on December 21, 2021: contributor

    Only logs I get is

    2021-12-21T16:13:24Z [Wallet] Performing wallet upgrade to 169900
    2021-12-21T16:13:24Z [Wallet] Upgrading wallet to HD
    

    this is a watch only wallet so that may be the case

  9. laanwj closed this on Feb 28, 2022

  10. DrahtBot locked this on Feb 28, 2023

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-04-19 03:14 UTC

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