Upgrade encrypted wallet #16360

pull darosior wants to merge 2 commits into bitcoin:master from darosior:upgrade_encrypted_wallet changing 4 files +79 −25
  1. darosior commented at 1:28 pm on July 9, 2019: member

    This PR:

    • makes the wallet upgrade a method of CWallet
    • adds a RPC command: upgradewallet

    Rationale: User with wallet created with old version of bitcoin-core were not able to use v0.18 because of a keypool error (#16091). If their wallet was encrypted they could not even upgrade the wallet and thus v0.18 became unusable.

    Problem: I don’t know how to write a test for this feature (how can I generate an old-version wallet ?) : I could not even find a test for the wallet upgrade functionnality. However I hand-tested and succesfully upgraded with v0.18 a wallet created with 0.11.1.

  2. fanquake added the label RPC/REST/ZMQ on Jul 9, 2019
  3. fanquake added the label Wallet on Jul 9, 2019
  4. instagibbs commented at 1:39 pm on July 9, 2019: member

    see #15761 which also adds the RPC

    with respect to upgradewallet tests, some discussion here https://github.com/bitcoin/bitcoin/pull/12134

  5. darosior commented at 1:49 pm on July 9, 2019: member
    @instagibbs Thank you for the links, I didn’t see this was already submitted.. I’ll check it out and close this one if it has the same behavior.
  6. Make UpgradeWallet() a CWallet method
    This remove the wallet upgrade code from the 'CreateWalletFromFile' method to create a new wallet method: 'UpgradeWallet', which make it possible to upgrade a wallet instance outside of 'CreateWalletFromFile' and thus not only at startup.
    66127bb384
  7. Add the 'upgradewallet' RPC command
    This add a new RPC command which permits to upgrade a wallet to, by default, the latest version or to an optionally passed as a parameter version
    803f6425c6
  8. darosior force-pushed on Jul 9, 2019
  9. DrahtBot commented at 4:36 pm on July 9, 2019: member

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #16341 (WIP: Introduce ScriptPubKeyMan interface and use it for key and script management (aka wallet boxes) by achow101)
    • #15761 (Replace -upgradewallet startup option with upgradewallet RPC by achow101)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  10. darosior commented at 11:48 pm on July 9, 2019: member
    Closing in favor of #15761
  11. darosior closed this on Jul 9, 2019

  12. MarcoFalke locked this on Dec 16, 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: 2024-12-18 09:13 UTC

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