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
Member

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 morcos:AllowIntermediateFlushes branch Apr 23, 2015
@morcos morcos restored the morcos:AllowIntermediateFlushes branch Apr 23, 2015
@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

This comment has been minimized.

Copy link
@sipa

sipa Apr 27, 2015

Member

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 morcos:AllowIntermediateFlushes branch 2 times, most recently from 66a0d4f to 2f74184 May 18, 2015
@morcos
Copy link
Member Author

morcos commented May 18, 2015

Needed rebase (nit fixed)

@MarcoFalke
Copy link
Member

MarcoFalke commented Nov 10, 2015

@morcos This needs an update/rebase?

@morcos morcos force-pushed the morcos:AllowIntermediateFlushes branch from 2f74184 to 143f846 Nov 12, 2015
@morcos
Copy link
Member 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 morcos:AllowIntermediateFlushes branch from 143f846 to 072e2f8 Nov 18, 2015
@morcos
Copy link
Member 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
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.