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

[Core] Alter assumptions in CCoinsViewCache::BatchWrite #1774

Conversation

random-zebra
Copy link

backports bitcoin#5967

Previously it would break if you flushed a parent cache while there was a child cache referring to it. This change will allow the flushing of parent caches.

It also modifies the unit test to include flushing of intermediate caches.

Previously it would break if you flushed a parent cache while there was
a child cache referring to it.  This change will allow the flushing of
parent caches.
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.

Tested with and without the fix, ACK 8025a2b

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

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

ACK 8025a2b

@random-zebra random-zebra merged commit 68df9a7 into PIVX-Project:master Aug 8, 2020
random-zebra added a commit that referenced this pull request Aug 18, 2020
cdbb1a6 Remove unused variable in test, fixing warning. (Russell Yanofsky)
03031a5 Check FRESH validity in CCoinsViewCache::BatchWrite (Russell Yanofsky)
3fb3e03 Fix dangerous condition in ModifyNewCoins. (random-zebra)
228d6bc [test] Add CCoinsViewCache Access/Modify/Write tests (random-zebra)

Pull request description:

  Going on with the coins view cache update work (started with #1774 and #1777).
  This backports the following upstream PRs (adapting them with the assumption that duplicate coinbase transactions are not possible):

  - bitcoin#9308 - [test] Add CCoinsViewCache Access/Modify/Write tests
  - bitcoin#9107 - Safer modify new coins
  - bitcoin#9310 - Assert FRESH validity in CCoinsViewCache::BatchWrite
  - bitcoin#9435 - Removed unused variable in test, fixing warning.

  Note: Will rebase #1773 on top of this one (to change `ApplyTxInUndo` return value in the unit test too).

ACKs for top commit:
  furszy:
    pretty nice one, ACK cdbb1a6
  Fuzzbawls:
    ACK cdbb1a6

Tree-SHA512: 69c534da1083c3c4a535923e98da7750474c6698bb45e042778b539a27fab0455d78aaf670bed9485522f9d2ee25e4ad57fa7d35632523fe7376fe5f5febb1e5
@random-zebra random-zebra modified the milestones: 5.0.0, 4.3.0 Sep 10, 2020
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