[wallet] Use fixed pubkey during wallet init for default key #10621

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:staticdefault changing 3 files +7 −10
  1. instagibbs commented at 6:58 PM on June 17, 2017: member

    vchDefaultKey is not used anymore except to mark a wallet as initialized during LoadWallet. Instead of taking a key from the keypool and adding to the wallet simply use a fixed key that is valid, for backwards compability.

    This allows wallets to return m/..../0 keys first with getnewaddress, being slightly less surprising to the user, as well as giving the meaning behind having a key loaded to the wallet.

    Key was chosen via smashing keyboard for entropy.

  2. Use fixed pubkey during wallet init for default key
    vchDefaultKey is not used anymore except to mark a
    wallet as initialized during LoadWallet. Instead of
    taking a key from the keypool and adding to the wallet
    simply use a fixed key that is valid, for backwards
    compability.
    f5ff6a8ac6
  3. in test/functional/wallet-hd.py:86 in f5ff6a8ac6
      82 | @@ -83,7 +83,7 @@ def run_test (self):
      83 |          for _ in range(num_hd_adds):
      84 |              hd_add_2 = self.nodes[1].getnewaddress()
      85 |              hd_info_2 = self.nodes[1].validateaddress(hd_add_2)
      86 | -            assert_equal(hd_info_2["hdkeypath"], "m/0'/0'/"+str(_+1)+"'")
      87 | +            assert_equal(hd_info_2["hdkeypath"], "m/0'/0'/"+str(_)+"'")
    


    MarcoFalke commented at 10:16 PM on June 17, 2017:

    nit: might want to rename the variable to something other than underscore, which is only used to denote something that is never used.

  4. laanwj added the label Wallet on Jun 17, 2017
  5. instagibbs renamed this:
    Use fixed pubkey during wallet init for default key
    [wallet] Use fixed pubkey during wallet init for default key
    on Jun 19, 2017
  6. jonasschnelli commented at 7:30 PM on August 15, 2017: contributor

    I think #10952 is preferable.

  7. instagibbs commented at 12:12 AM on August 16, 2017: member

    Closing in favor of #10952

  8. instagibbs closed this on Aug 16, 2017

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

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