Skip to content

Conversation

achow101
Copy link
Member

Moves the BDB specific classes from db.{cpp/h} to bdb.{cpp/h}.

To do this, SplitWalletFilePath is first made non-static. Then IsWalletLoaded functionality is moved to IsBDBWalletLoaded which is called by IsWalletLoaded. Then the bulk of db.{cpp/h} is moved to a new file bdb.{cpp/h}.

While doing some moveonly stuff, an additional commit moves the *Cursor and Txn* implementations out of the header file and into the cpp file.

Part of #18971

@DrahtBot
Copy link
Contributor

DrahtBot commented Jun 16, 2020

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.

@laanwj
Copy link
Member

laanwj commented Jun 16, 2020

Code review ACK 61c1633
(you have a misspelling in your first commit message though "SpliWalletFilePath")

@promag
Copy link
Contributor

promag commented Jun 16, 2020

Yesterday I was reviewing #18971 and thought about splitting it, and this PR is exactly it.

Code review ACK 61c1633.

nit, typo in first commit, if you have to push again for some other reason.

Copy link
Contributor

@meshcollider meshcollider left a comment

Choose a reason for hiding this comment

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

utACK 61c1633

@meshcollider meshcollider merged commit 62d863f into bitcoin:master Jun 17, 2020
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 61c1633

maflcko pushed a commit that referenced this pull request Jun 18, 2020
…Exists functions into non-template functions

a389ed5 walletdb: refactor Read, Write, Erase, and Exists into non-template func (Andrew Chow)

Pull request description:

  In order to override these later, the specific details of how the Read, Write, Erase, and Exists functions interact with the actual database file need to go into functions that are not templated.

  The functions `ReadKey`, `WriteKey`, `EraseKey`, and `HasKey` are introduced to handle the actual interaction with the database.

  This is mostly a moveonly.

  Based on #19290

ACKs for top commit:
  ryanofsky:
    Code review ACK a389ed5. No changes since last review, just non-conflicting rebase
  Sjors:
    utACK a389ed5
  MarcoFalke:
    ACK a389ed5 🔳

Tree-SHA512: 73bd2fe9ddc4a132d4db6b97e77f5d5f8aa68b8cb25192384f3bacd826365947763a9eee73672331d34578e3f5ade85ee6aa550ff4d89eb62e482250dd5973e4
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 7, 2020
Summary:
Partial backport (1/5) of core [[bitcoin/bitcoin#19290 | PR19290]]:
bitcoin/bitcoin@c3538f4

Test Plan:
  ninja all check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8611
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 7, 2020
Summary:
Partial backport (2/5) of core [[bitcoin/bitcoin#19290 | PR19290]]:
bitcoin/bitcoin@f6fc5f3

Depends on D8611.

Test Plan:
  ninja all check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8612
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 7, 2020
Summary:
Partial backport (3/5) of core [[bitcoin/bitcoin#19290 | PR19290]]:
bitcoin/bitcoin@25a6557

Depends on D8612.

Test Plan:
  ninja all check

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8613
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 7, 2020
Summary:
```
Put the implementation in the cpp, not the h file.
```

Partial backport (4/5) of core [[bitcoin/bitcoin#19290 | PR19290]]:
bitcoin/bitcoin@8f03364

Depends on D8613.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D8614
Fabcien pushed a commit to Bitcoin-ABC/bitcoin-abc that referenced this pull request Dec 7, 2020
Summary:
```
Leave wallet/db.{cpp/h} for generic WalletDatabase stuff. The BDB
specific stuff goes into bdb.{cpp/h}
```

Completes backport (5/5) of core [[bitcoin/bitcoin#19290 | PR19290]]:
bitcoin/bitcoin@61c1633

Depends on D8614.

Test Plan:
  ninja all check-all

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Subscribers: majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8615
@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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants