Preemptively catch a few potential bugs#5580
Merged
laanwj merged 2 commits intobitcoin:masterfrom Jan 2, 2015
Merged
Conversation
It is easily confused with CCoinsViewCache(CCoinsView*), which creates a sub-cache, but instead of creating a sub-cache, the copy constructor would copy the original and use that original's base, defeating the intended isolation.
…ck, behave correctly
Member
|
utACK |
Member
|
utACK |
random-zebra
added a commit
to PIVX-Project/PIVX
that referenced
this pull request
May 20, 2020
e337706 Make CCoinsViewCache's copy constructor private (furszy) Pull request description: This causes CCoinsViewCache(CCoinsViewCache) to fail at compile-time rather than copy an existing cache (most likely the caller intends to sub-cache it) It also makes ConnectBlock's fJustCheck work correctly for the genesis block, just in case it gets in there somehow. Coming from upstream@[5580](bitcoin#5580) ACKs for top commit: random-zebra: utACK e337706 Fuzzbawls: utACK e337706 Tree-SHA512: a4494ba6cd0bcb36ca5a37e6e30770d5a7e5d05ff9f98ff333aa7c72ef0470cca30fa83e7e81895ceb0e74cef59aa41458dd742223d1602b5900df9f1292a524
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This causes CCoinsViewCache(CCoinsViewCache) to fail at compile-time rather than copy an existing cache (most likely the caller intends to sub-cache it)
It also makes ConnectBlock's fJustCheck work correctly for the genesis block, just in case it gets in there somehow.