wallet: BerkeleyDatabase make BerkeleyDatabase::Create, CreateMock, and CreateDummy non-static functions #19310

pull achow101 wants to merge 3 commits into bitcoin:master from achow101:bdb-refactor-create changing 15 files +74 −65
  1. achow101 commented at 4:45 pm on June 17, 2020: member

    Instead of having Create, CreateMock, and CreateDummy being static functions in BerkeleyDatabase, move these to standalone functions in walletdb.cpp. This prepares us for having different WalletDatabase classes.

    Part of #18971. This was originally one commit but has been split into 3 to make it (hopefully) easier to review.

  2. Add Create*WalletDatabase functions
    These functions doing the same things as WalletDatabase::Create,
    CreateMock, and CreateDummy
    45c08f8a7b
  3. scripted-diff: Replace WalletDatabase::Create* with CreateWalletDatabase
    -BEGIN VERIFY SCRIPT-
    sed -i -e 's/WalletDatabase::Create(/CreateWalletDatabase(/g' `git grep -l "WalletDatabase::Create("`
    sed -i -e 's/WalletDatabase::CreateDummy(/CreateDummyWalletDatabase(/g' `git grep -l "WalletDatabase::CreateDummy("`
    sed -i -e 's/WalletDatabase::CreateMock(/CreateMockWalletDatabase(/g' `git grep -l "WalletDatabase::CreateMock("`
    -END VERIFY SCRIPT-
    d6045d0ac6
  4. Remove WalletDatabase::Create, CreateMock, and CreateDummy
    These are superseded by CreateWalletDatabase, CreateMockWalletDatabase,
    and CreateDummyWalletDatabase
    da7a83c5ee
  5. achow101 force-pushed on Jun 17, 2020
  6. DrahtBot added the label GUI on Jun 17, 2020
  7. DrahtBot added the label Tests on Jun 17, 2020
  8. DrahtBot added the label Wallet on Jun 17, 2020
  9. MarcoFalke removed the label GUI on Jun 17, 2020
  10. MarcoFalke removed the label Tests on Jun 17, 2020
  11. MarcoFalke commented at 8:44 pm on June 17, 2020: member

    ACK da7a83c5ee6a51ff4c3eb35dbd447a310c4a0387 🎂

    Signature:

     0-----BEGIN PGP SIGNED MESSAGE-----
     1Hash: SHA512
     2
     3ACK da7a83c5ee6a51ff4c3eb35dbd447a310c4a0387 🎂
     4-----BEGIN PGP SIGNATURE-----
     5
     6iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
     7pUiMrAv/QrttGfwxpq8jwlsfHOnGVHTSYiAHbPRuO5rpuIVHsxBwQt8jUizFgYSn
     8Q8qxmHGhQ3k/MHqhmFlkt36Um797cSNBvqlOjGajOLajBdUPEVnHkMM47S6Q0PGh
     9ImF5CR/SH8zuV0D+iVJX1W+3xq9GDnd66CwAMOWP3LkQSsX/Z3aq56InWEgLyPXW
    101mbyMRmp+LbTYlVdWxJJcRLJ9BKVWUhnnYTDOzgzzRT+pR38kiDY81DEb9tpmErG
    11+mBxVGazHqg8jW4qRQ+pGCJRE4j5MiLaGIrH31qVI0EZmlN3oOXhvKr56yRg3XfM
    12C+qFF7bl2fYAe56fSb5ffcesRmMRAKKsh8/LFEDMH7s/++d4sJvwmDCRsGeJSc5V
    13/5LZPIredNSGRSAnYcbNRPq0COXz1oFFCJagWJV/97Kg5oke5WEUxg4C/K6mvz36
    14qGB61lRTGHowx16z9hCA35OFOKnd6vWsAP295+HTWl85SqLfT33pWZcEy59LSsZE
    15wP7LbPrb
    16=A4a0
    17-----END PGP SIGNATURE-----
    

    Timestamp of file with hash 8650a5142226d566342941e06ab2b8577883c63c794e047ee202df26edf4e401 -

  12. DrahtBot commented at 11:13 pm on June 17, 2020: 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:

    • #19216 (wallet: Remove first parameter to ScanForWalletTransactions start_hash by pstratem)
    • #19137 (wallettool: Add dump and createfromdump commands by achow101)
    • #19102 (wallet: Introduce and use DummyDatabase instead of dummy BerkeleyDatabase by achow101)
    • #19099 (refactor: Move wallet methods out of chain.h and node.h by ryanofsky)
    • #19098 (test: Remove duplicate NodeContext hacks by ryanofsky)
    • #19077 (wallet: Add sqlite as an alternative wallet database and use it for new descriptor wallets by achow101)
    • #18971 (wallet: Refactor the classes in wallet/db.{cpp/h} by achow101)
    • #18354 (Use shared pointers only in validation interface by bvbfan)

    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.

  13. MarcoFalke added the label Refactoring on Jun 18, 2020
  14. ryanofsky approved
  15. ryanofsky commented at 8:26 pm on June 18, 2020: member
    Code review ACK da7a83c5ee6a51ff4c3eb35dbd447a310c4a0387. Easy review, nice scripted-diff
  16. MarcoFalke merged this on Jun 18, 2020
  17. MarcoFalke closed this on Jun 18, 2020

  18. Fabcien referenced this in commit 4e3282e343 on Jun 2, 2021
  19. Fabcien referenced this in commit a6336823cd on Jun 2, 2021
  20. Fabcien referenced this in commit 9947dbf235 on Jun 2, 2021
  21. 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-12-18 15:12 UTC

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