Fix hdmaster-key / seed-key confusion #12094

pull jonasschnelli wants to merge 7 commits into bitcoin:master from jonasschnelli:2018/01/hdseed changing 10 files +57 −57
  1. jonasschnelli commented at 11:47 pm on January 4, 2018: contributor

    Addresses #12084 and #8684

    This renames a couple of functions and members (no functional changes, expect log prints):

    • Rename CKey::SetMaster to CKey::SetSeed
    • Rename CHDChain::masterKeyId to CHDChain::seedKeyID
    • Rename CHDChain::hdMasterKeyID to CHDChain::hdSeedKeyID
    • Rename CWallet::GenerateNewHDMasterKey to CWallet::GenerateNewHDSeedKey
    • Rename CWallet::SetHDMasterKey to CWallet::SetHDSeedKey

    As well it introduces a tiny API change (a649ab2):

    • RPC API change: Rename “hdmasterkeyid” to “hdseedkeyid”, rename “hdmaster” in wallet-dump output to “hdseed”

    Fixes also a bug (16d49e1):

    • Bugfix: use “s” instead of the incorrect “m” for the seed-key hd-keypath key metadata
  2. jonasschnelli added the label Needs release notes on Jan 4, 2018
  3. jonasschnelli added the label Wallet on Jan 4, 2018
  4. achow101 commented at 7:03 am on January 6, 2018: member

    utACK 16d49e1b82808803d6c492056219e53791d14cfe

    Couldn’t you have done this with scripted diffs?

    It would be nice to include the actual hdmasterkeyid in the getwalletinfo output, not just the seed id. But that can be done later.

  5. Rename CKey::SetMaster to CKey::SetSeed 004685b6e6
  6. jonasschnelli force-pushed on Feb 25, 2018
  7. jonasschnelli commented at 1:21 am on February 25, 2018: contributor
    Rebased.
  8. Rename CHDChain::masterKeyId to CHDChain::seedKeyID a4a55c2414
  9. Rename CWallet::SetHDMasterKey to CWallet::SetHDSeedKey bb83659c79
  10. Rename CHDChain::hdMasterKeyID to CHDChain::hdSeedKeyID b0afb720d9
  11. Rename CWallet::GenerateNewHDMasterKey to CWallet::GenerateNewHDSeedKey 99842532a9
  12. RPC API change: Rename "hdmasterkeyid" to "hdseedkeyid"
    Rename wallet dumps "hdmaster" to "hdseed"
    ef02669c1c
  13. Bugfix: use "s" instead of the incorrect "m" for the seed-key hd-keypath d4f71db3e8
  14. in src/wallet/rpcdump.cpp:736 in 7971f6eaee outdated
    732@@ -733,14 +733,14 @@ UniValue dumpwallet(const JSONRPCRequest& request)
    733     file << strprintf("#   mined on %s\n", EncodeDumpTime(chainActive.Tip()->GetBlockTime()));
    734     file << "\n";
    735 
    736-    // add the base58check encoded extended master if the wallet uses HD
    737-    CKeyID masterKeyID = pwallet->GetHDChain().masterKeyID;
    738-    if (!masterKeyID.IsNull())
    739+    // add the base58check encoded extended master if the wallet uses HD 
    


    MarcoFalke commented at 4:44 pm on February 25, 2018:
    hidden whitespace change :eye:

    jonasschnelli commented at 1:54 am on February 27, 2018:
    Oh! Thanks. Fixed.
  15. jonasschnelli force-pushed on Feb 27, 2018
  16. jnewbery commented at 9:21 pm on April 3, 2018: member

    Concept ACK. Naming things accurately is always helpful.

    Rename CHDChain::masterKeyId to CHDChain::seedKeyID Rename CHDChain::hdMasterKeyID to CHDChain::hdSeedKeyID Rename CWallet::GenerateNewHDMasterKey to CWallet::GenerateNewHDSeedKey Rename CWallet::SetHDMasterKey to CWallet::SetHDSeedKey

    Can you rename MasterKey -> Seed instead of MasterKey -> SeedKey please. The seed is not a key.

  17. MarcoFalke commented at 9:28 pm on April 3, 2018: member
    Would be nice to do this as scripted diff
  18. jnewbery commented at 4:58 pm on April 4, 2018: member
    Implemented as a scripted diff here: https://github.com/jnewbery/bitcoin/tree/master_key_to_seed @jonasschnelli - are you still interested in maintaining this? If not, I can open a new PR.
  19. MarcoFalke deleted a comment on Apr 6, 2018
  20. jnewbery deleted a comment on Apr 9, 2018
  21. jnewbery commented at 3:17 pm on April 9, 2018: member
    I’ve opened #12924, which is this PR reimplemented as a scripted diff. @jonasschnelli - I’m very happy to close that PR if you want to start maintaining this one again. Just let me know!
  22. jonasschnelli commented at 3:20 pm on April 9, 2018: contributor
    Closing in favour of #12924… thanks @jnewbery!
  23. jonasschnelli closed this on Apr 9, 2018

  24. sipa removed the label Needs release notes on Aug 14, 2018
  25. jnewbery deleted a comment on Apr 1, 2020
  26. MarcoFalke deleted a comment on Apr 3, 2020
  27. DrahtBot locked this on Feb 15, 2022

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: 2024-10-04 22:12 UTC

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