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.
It also modifies the unit test to include flushing of intermediate caches.
147 | - // cache does have (a non-pruned) one. Move the data up, and 148 | - // mark it as fresh (if the grandparent did have it, we 149 | - // would have pulled it in at first GetCoins). 150 | - assert(it->second.flags & CCoinsCacheEntry::FRESH); 151 | + // The parent cache does not have an entry, while the child does 152 | + // We can ignore it if its both FRESH and pruned in the child
Nit: s/its/it's/
Untested ACK, but the unit test should cover it.
Needed rebase (nit fixed)
@morcos This needs an update/rebase?
rebased
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.