[Wallet] keep HD seed during salvagewallet #8324

pull jonasschnelli wants to merge 1 commits into bitcoin:master from jonasschnelli:2016/07/hd_salvage changing 2 files +2 −2
  1. jonasschnelli commented at 11:03 AM on July 9, 2016: contributor

    Calling -salvagewallet (CWalletDB::Recover in keys only mode) will result in dropping the information which private key is used for hd key derivation (and also loses the child key counter).

    This simple PR would try to keep the hdchain record if it was available during the time when -salvagewallet was called.

  2. [Wallet] keep HD seed during salvagewallet b993671921
  3. jonasschnelli added the label Wallet on Jul 9, 2016
  4. MarcoFalke commented at 4:21 PM on July 9, 2016: member

    Thanks! I can confirm that b993671 fixes the travis failure in #8319.

  5. MarcoFalke commented at 10:11 AM on July 11, 2016: member

    This feels like a bug fix, which should be release as part of 0.13.0... Am I wrong?

  6. laanwj added this to the milestone 0.13.0 on Jul 11, 2016
  7. laanwj commented at 11:25 AM on July 11, 2016: member

    I agree this is a bug fix. I don't think -salvagewallet dropping the master key is in any way expected behavior. Would be nice to have a test for this.

  8. MarcoFalke commented at 11:32 AM on July 11, 2016: member

    Would be nice to have a test for this.

    You can find the test in #8319

  9. jonasschnelli commented at 11:45 AM on July 11, 2016: contributor

    [...] I don't think -salvagewallet dropping the master key is in any way expected behavior. [...]

    At the moment, the private key itself will not be dropped, only the information which of the private keys is used as HD seed. Without that information, current masters wallet will create another private key and uses this one as the HD seed. This will result in two different HD chains once you call -salvagewallet.

    Yes. It's a bugfix and It probably should go into 0.13, though I think #8323 is more important.

  10. MarcoFalke commented at 11:37 AM on July 13, 2016: member

    utACK b993671921c0c301f18c542e77d695fdc50ffd91

  11. laanwj merged this on Jul 14, 2016
  12. laanwj closed this on Jul 14, 2016

  13. laanwj referenced this in commit bc94b87487 on Jul 14, 2016
  14. laanwj commented at 9:38 AM on July 14, 2016: member
  15. DrahtBot locked this on Sep 8, 2021
Labels

Milestone
0.13.0


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-13 21:15 UTC

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