Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Move CDiskTxPos/CBlockUndo to txdb.h/undo.h respectively #1319

Merged

Conversation

Fuzzbawls
Copy link
Collaborator

This is PR is the second part of breaking up #1209 into individual narrow-focused PRs. Original commit was cherry-picked from @barrystyle's initial pre-squashed branch (reference branch is at https://github.com/Fuzzbawls/PIVX/commits/pr-1209)

Here CDiskTxPos and CBlockUndo are moved out of main.h into more appropriate files, namely txdb.h and undo.h.

Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

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

utACK fe2af5e

Copy link

@random-zebra random-zebra left a comment

Choose a reason for hiding this comment

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

utACK fe2af5e and merging...

random-zebra added a commit that referenced this pull request Feb 1, 2020
…espectively

fe2af5e Move CDiskTxPos/CBlockUndo to txdb.h/undo.h respectively (barrystyle)

Pull request description:

  This is PR is the second part of breaking up #1209 into individual narrow-focused PRs. Original commit was cherry-picked from @barrystyle's initial pre-squashed branch (reference branch is at https://github.com/Fuzzbawls/PIVX/commits/pr-1209)

  Here `CDiskTxPos` and `CBlockUndo` are moved out of `main.h` into more appropriate files, namely `txdb.h` and `undo.h`.

ACKs for top commit:
  furszy:
    utACK fe2af5e
  random-zebra:
    utACK fe2af5e and merging...

Tree-SHA512: 57c7d55da931338b5212f412cadca639f2e1a9b90ea47749bf7e0c981af1091d2cb065cb8e1a6592db94b06085e59f6271b259b4a328ded8afcaf9d7bed089cf
@random-zebra random-zebra merged commit fe2af5e into PIVX-Project:master Feb 1, 2020
random-zebra added a commit that referenced this pull request Feb 5, 2020
…erify.cpp

1e0bc16 Move transaction checks out to consensus/tx_verify.cpp. (barrystyle)

Pull request description:

  This is PR is the third part of breaking up #1209 into individual narrow-focused PRs. Original commit(s) were cherry-picked from @barrystyle's initial pre-squashed branch and then re-squashed (reference branch is at https://github.com/Fuzzbawls/PIVX/commits/pr-1209)

  Input commits:
  Fuzzbawls@90950f1
  Fuzzbawls@10b7566

  ---------------

  This Moves the basic (non-zerocoin) transaction validation checks away from main.h(cpp) and into the `consensus` subdir. Code move only, no changes to functionality.

  This PR conflicts minorly with #1319, and will need to be rebased once that PR is merged, but reviewing is possible now as the conflicts are mostly just matter-of-fact conflicts due to both PRs touching a common file.

  Relies on:
  - [x] #1319

ACKs for top commit:
  furszy:
    utACK 1e0bc16
  random-zebra:
    utACK 1e0bc16 and merging...

Tree-SHA512: aa82d6f473d7ff6b65f04e590eb5dcfbcb5c1f22635bc22f0204ef3c23adcca99f95fc16d0b838c7358d6b832a4c55d43bf5f255902ea7fea4f5ff6216ea1423
random-zebra added a commit that referenced this pull request Aug 12, 2020
5147571 Break circular dependency main ↔ txdb (random-zebra)
2725fac txdb: Add Cursor() method to CCoinsView to iterate over UTXO set (random-zebra)

Pull request description:

  Other two quick backports needed for the upcoming per-txout model.

  - bitcoin#7756 - Add cursor to iterate over utxo set, use this in `gettxoutsetinfo`
    > - Add a method `Cursor()` to `CCoinsView` that returns a cursor which can be used to iterate over the whole UTXO set.
    > - Implement `GetUTXOStats` in terms of this, remove `GetStats()` method on `CCoinsView`.
    > - Change `gettxoutsetinfo` RPC to use new `GetUTXOStats` function.

  - bitcoin#7815 - Break circular dependency main ↔ txdb (part of this was done already in #1302 and #1319)
    > - Moving `CBlockFileInfo` from main.h to chain.h. I think this makes sense, as the other block-file stuff is there too.
    > - Moving `CDiskTxPos` from main.h to txdb.h. This type, used for `-txindex` seems specific to txdb.
    > - Pass a functor `insertBlockIndex` to `LoadBlockIndexGuts`. This leaves it up to the caller how to insert block indices.

ACKs for top commit:
  furszy:
    ACK 5147571
  Fuzzbawls:
    ACK 5147571

Tree-SHA512: 166f5d797fac68667c59e002a3596af65596cd6ebee5e8b4bee538e6f66ec5f6365e4dd0bbb44be2226ebb51411d4db01f9f2417660841ed7a5125b3c8a7ad97
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants