wallet: default wallet migration, modify inconvenient backup filename #29586

pull furszy wants to merge 1 commits into bitcoin:master from furszy:2024_wallet_migration_empty_wallet_backup_name changing 2 files +11 −2
  1. furszy commented at 2:10 pm on March 7, 2024: member

    Fixes #29584

    On default legacy wallets, the backup filename starts with an “-” due to the wallet name being empty. This is inconvenient for systems who treat what follows the initial “-” character as flags.

    Note: As the user can freely set the wallet name to anything, we could also guard the backup filename against other inconvenient characters in the future (we need to be careful here, because the wallet name could also be a path).

  2. DrahtBot commented at 2:10 pm on March 7, 2024: contributor

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

    Code Coverage

    For detailed information about the code coverage, see the test coverage report.

    Reviews

    See the guideline for information on the review process.

    Type Reviewers
    ACK brunoerg, vasild, achow101
    Stale ACK laanwj, BrandonOdiwuor, murchandamus

    If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #28710 (Remove the legacy wallet and BDB dependency 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.

  3. DrahtBot added the label Wallet on Mar 7, 2024
  4. laanwj approved
  5. laanwj commented at 2:16 pm on March 7, 2024: member

    Thank you !

    Code review ACK 21ef8221eb473543e61f64953dacb488cdc556d8

  6. BrandonOdiwuor approved
  7. BrandonOdiwuor commented at 2:46 pm on March 7, 2024: contributor
    utACK 21ef8221eb473543e61f64953dacb488cdc556d8
  8. in test/functional/wallet_migration.py:536 in 21ef8221eb outdated
    528@@ -529,11 +529,20 @@ def test_default_wallet(self):
    529         self.log.info("Test migration of the wallet named as the empty string")
    530         wallet = self.create_legacy_wallet("")
    531 
    532-        self.migrate_wallet(wallet)
    533+        # Move time to have a unique name
    534+        curr_time = int(time.time()) + 100
    535+        wallet.setmocktime(curr_time)
    536+
    537+        res = self.migrate_wallet(wallet)
    


    murchandamus commented at 6:12 pm on March 8, 2024:
    Good idea on putting the time into the name, but why do you add 100 instead of just using the current time?

    furszy commented at 10:40 pm on March 8, 2024:

    why do you add 100 instead of just using the current time?

    Just because I coded it while we were on the weekly meeting.. and took time.time() as the node’s mocked time. Fixed. Thanks.

  9. murchandamus commented at 6:15 pm on March 8, 2024: contributor
    crACK 21ef8221eb473543e61f64953dacb488cdc556d8
  10. wallet: default wallet migration, modify inconvenient backup filename
    On default legacy wallets, the backup filename starts with an "-" due
    to the wallet name being empty. This is inconvenient for systems who
    treat what follows the initial "-" character as flags.
    a951dba3a9
  11. furszy force-pushed on Mar 8, 2024
  12. brunoerg approved
  13. brunoerg commented at 10:13 pm on March 9, 2024: contributor
    utACK a951dba3a9d7663f009701140d663338e6c526a4
  14. DrahtBot requested review from laanwj on Mar 9, 2024
  15. DrahtBot requested review from murchandamus on Mar 9, 2024
  16. DrahtBot requested review from BrandonOdiwuor on Mar 9, 2024
  17. vasild approved
  18. vasild commented at 10:45 am on March 11, 2024: contributor
    ACK a951dba3a9d7663f009701140d663338e6c526a4
  19. DrahtBot removed review request from BrandonOdiwuor on Mar 11, 2024
  20. DrahtBot requested review from BrandonOdiwuor on Mar 11, 2024
  21. achow101 commented at 12:10 pm on March 11, 2024: member
    ACK a951dba3a9d7663f009701140d663338e6c526a4
  22. DrahtBot removed review request from BrandonOdiwuor on Mar 11, 2024
  23. DrahtBot requested review from BrandonOdiwuor on Mar 11, 2024
  24. achow101 merged this on Mar 11, 2024
  25. achow101 closed this on Mar 11, 2024

  26. furszy deleted the branch on Mar 11, 2024

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

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