wallet: Add key generation type #8132

pull luke-jr wants to merge 4 commits into bitcoin:master from luke-jr:keygentype changing 5 files +57 −3
  1. luke-jr commented at 7:32 PM on June 1, 2016: member

    Continuing #5916 by adding backward compatibility with existing wallets

  2. add key generation type
    A encrypted wallet can still hold keys which where created when the wallet was unencrypted.
    
    This PR will add a 8bit-flags-int to the CKeyMetadata class.
    
    `listreceivedbyaddress` will report whether the key was generated within a enctypted wallet or if it was imported throught `importprivkey`
    1d6d3dad68
  3. renamed keyGenerationType to keyOrigin, added new wallet feature level f1fef042df
  4. Use a 32bit bitmask for key generation type, remove unset type d4142be472
  5. wallet: Provide compatibility with existing wallets using 8-bit flags 104ab313ba
  6. jonasschnelli commented at 9:04 AM on June 2, 2016: contributor

    Hmm... we never have deployed #5916 (I guess you did in your custom distribution?). This would mean 104ab313baeac2f909ce1fb10fe8562327b35e01 would address a feature-compatibility between third party distribution. Okay for me but results in some ugly migration code.

    My preferred solution would be:

    • a) 104ab313baeac2f909ce1fb10fe8562327b35e01 must only be included in your custom distribution (if people swap wallet.dat from your fork to Core they might need to manually migrate first)
    • b) If a) is problematic, keep the 8BIT bitfield and merge #5916 (which should be sufficient IMO).

    PR nit: s/FEATURE_KEYFLAGS_OLD/FEATURE_KEYFLAGS_8BIT/ , s/VERSION_SUPPORT_FLAGS_OLD/VERSION_SUPPORT_FLAGS_8BIT/

  7. jonasschnelli added the label Wallet on Jun 2, 2016
  8. luke-jr commented at 2:51 PM on June 2, 2016: member

    I called it "OLD" rather than "8BIT" because there's a bitshift involved.

    Any idea what's up with Travis's Mac build? :/

  9. laanwj commented at 1:21 PM on June 3, 2016: member

    I'd prefer to not include migration code for something that we never deployed. You can include that in your own distribution, of course.

  10. luke-jr commented at 7:26 AM on September 10, 2016: member

    Superceded by #8471

  11. luke-jr closed this on Sep 10, 2016

  12. DrahtBot 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-04-13 21:15 UTC

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