Skip to content

Conversation

@achow101
Copy link
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.

These functions doing the same things as WalletDatabase::Create,
CreateMock, and CreateDummy
achow101 added 2 commits June 17, 2020 14:12
-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-
These are superseded by CreateWalletDatabase, CreateMockWalletDatabase,
and CreateDummyWalletDatabase
@maflcko
Copy link
Member

maflcko commented Jun 17, 2020

ACK da7a83c 🎂

Show signature and timestamp

Signature:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

ACK da7a83c5ee6a51ff4c3eb35dbd447a310c4a0387 🎂
-----BEGIN PGP SIGNATURE-----

iQGzBAEBCgAdFiEE+rVPoUahrI9sLGYTzit1aX5ppUgFAlwqrYAACgkQzit1aX5p
pUiMrAv/QrttGfwxpq8jwlsfHOnGVHTSYiAHbPRuO5rpuIVHsxBwQt8jUizFgYSn
Q8qxmHGhQ3k/MHqhmFlkt36Um797cSNBvqlOjGajOLajBdUPEVnHkMM47S6Q0PGh
ImF5CR/SH8zuV0D+iVJX1W+3xq9GDnd66CwAMOWP3LkQSsX/Z3aq56InWEgLyPXW
1mbyMRmp+LbTYlVdWxJJcRLJ9BKVWUhnnYTDOzgzzRT+pR38kiDY81DEb9tpmErG
+mBxVGazHqg8jW4qRQ+pGCJRE4j5MiLaGIrH31qVI0EZmlN3oOXhvKr56yRg3XfM
C+qFF7bl2fYAe56fSb5ffcesRmMRAKKsh8/LFEDMH7s/++d4sJvwmDCRsGeJSc5V
/5LZPIredNSGRSAnYcbNRPq0COXz1oFFCJagWJV/97Kg5oke5WEUxg4C/K6mvz36
qGB61lRTGHowx16z9hCA35OFOKnd6vWsAP295+HTWl85SqLfT33pWZcEy59LSsZE
wP7LbPrb
=A4a0
-----END PGP SIGNATURE-----

Timestamp of file with hash 8650a5142226d566342941e06ab2b8577883c63c794e047ee202df26edf4e401 -

@DrahtBot
Copy link
Contributor

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

Conflicts

Reviewers, this pull request conflicts with the following ones:

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.

Copy link
Contributor

@ryanofsky ryanofsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review ACK da7a83c. Easy review, nice scripted-diff

@maflcko maflcko merged commit dbd7a91 into bitcoin:master Jun 18, 2020
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 2, 2021
Summary:
These functions doing the same things as WalletDatabase::Create,
CreateMock, and CreateDummy

This is a backport of [[bitcoin/bitcoin#19310 | core#19310]] [1/3]
bitcoin/bitcoin@45c08f8

Test Plan: `ninja`

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9619
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 2, 2021
Summary:
```
-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("`
arc lint
-END VERIFY SCRIPT-
```

This is a partial backport of [[bitcoin/bitcoin#19310 | core#19310]] [2/3]
Can be compared with bitcoin/bitcoin@d6045d0

Backport note: I ran the script rather than cherry-picking the commit.

Depends on D9619

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9620
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Jun 2, 2021
Summary:
These are superseded by CreateWalletDatabase, CreateMockWalletDatabase,
and CreateDummyWalletDatabase

This concludes backport of [[bitcoin/bitcoin#19310 | core#19310]] [3/3]
bitcoin/bitcoin@da7a83c

Test Plan: `ninja all check-all`

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9621
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Feb 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants