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

Alter assumptions in CCoinsViewCache::BatchWrite #5967

Merged
merged 1 commit into from
Nov 27, 2015

Conversation

morcos
Copy link
Contributor

@morcos morcos commented Apr 3, 2015

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.

@morcos morcos closed this Apr 23, 2015
@morcos morcos deleted the AllowIntermediateFlushes branch April 23, 2015 19:28
@morcos morcos restored the AllowIntermediateFlushes branch April 23, 2015 19:29
@morcos morcos reopened this Apr 23, 2015
// would have pulled it in at first GetCoins).
assert(it->second.flags & CCoinsCacheEntry::FRESH);
// The parent cache does not have an entry, while the child does
// We can ignore it if its both FRESH and pruned in the child
Copy link
Member

Choose a reason for hiding this comment

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

Nit: s/its/it's/

@sipa
Copy link
Member

sipa commented Apr 27, 2015

Untested ACK, but the unit test should cover it.

@morcos morcos force-pushed the AllowIntermediateFlushes branch 2 times, most recently from 66a0d4f to 2f74184 Compare May 18, 2015 15:52
@morcos
Copy link
Contributor Author

morcos commented May 18, 2015

Needed rebase (nit fixed)

@maflcko
Copy link
Member

maflcko commented Nov 10, 2015

@morcos This needs an update/rebase?

@morcos
Copy link
Contributor Author

morcos commented Nov 12, 2015

rebased

@sipa
Copy link
Member

sipa commented Nov 13, 2015

Code review & lightly tested ACK.

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.
@morcos morcos force-pushed the AllowIntermediateFlushes branch from 143f846 to 072e2f8 Compare November 18, 2015 17:14
@morcos
Copy link
Contributor Author

morcos commented Nov 18, 2015

This was rebased to modify the new unit test added from #6932 as well.

@morcos morcos mentioned this pull request Nov 18, 2015
@laanwj laanwj merged commit 072e2f8 into bitcoin:master Nov 27, 2015
laanwj added a commit that referenced this pull request Nov 27, 2015
072e2f8 Alter assumptions in CCoinsViewCache::BatchWrite (Alex Morcos)
random-zebra added a commit to PIVX-Project/PIVX that referenced this pull request Aug 8, 2020
8025a2b Alter assumptions in CCoinsViewCache::BatchWrite (Alex Morcos)

Pull request description:

  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.

ACKs for top commit:
  furszy:
    Tested with and without the fix, ACK 8025a2b
  Fuzzbawls:
    ACK 8025a2b

Tree-SHA512: 101325b04a410916dac9ad32f490232ac935cd9cdabfad00606ac7875e53a4e22f5416d9807df29e5bc748891370a45c9a2e3aa2cef8e113a43e3f8e7fe8c275
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
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