Attempting to create new non-HD wallet ignores -usehd=0 without warning #11313

issue dooglus opened this issue on September 12, 2017
  1. dooglus commented at 9:52 PM on September 12, 2017: contributor

    Built against master branch 801dd40666d1e6009920ad3ff755c7bb993b2a62:

    If I have no wallet.dat file and run:

    bitcoind -usehd=0

    A new wallet.dat file is created and an HD seed is assigned.

    I see an error message in the source:

    "Error loading %s: You can't disable HD on an already existing HD wallet or create new non-HD wallets."

    but that doesn't get shown because fFirstRun is true, and so the code which checks for -usehd values doesn't run.

    If it's no longer possible to create non-HD wallets, specifying -usehd=0 when creating a wallet should be an error, and not get silently ignored.

  2. MarcoFalke commented at 9:54 PM on September 12, 2017: member
  3. MarcoFalke added the label Wallet on Sep 12, 2017
  4. dooglus commented at 10:11 PM on September 12, 2017: contributor

    Thanks. I missed that one.

    I was hoping to be able to create a pre-HD wallet to test #11085, but I see that is no longer an option. Any ideas how I can write a test that converts a pre-HD wallet to an HD wallet when -usehd has gone away?

  5. achow101 commented at 10:53 PM on September 12, 2017: member

    Any ideas how I can write a test that converts a pre-HD wallet to an HD wallet when -usehd has gone away?

    You could make a small non-hd wallet file and test the upgrade for that.

  6. MarcoFalke cross-referenced this on Sep 18, 2017 from issue wallet: Display non-HD error on first run by MarcoFalke
  7. laanwj closed this on Sep 19, 2017

  8. laanwj referenced this in commit 4f7e37e26c on Sep 19, 2017
  9. smaicloud cross-referenced this on Apr 7, 2020 from issue PHR-17 Upgrade path for non-HD wallets to HD by KolbyML
  10. bitcoin locked this on Sep 8, 2021

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-05-20 06:55 UTC