-
Notifications
You must be signed in to change notification settings - Fork 679
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
backport: Use std::unique_ptr (C++11) where possible (bitcoin #11043) #1165
base: develop
Are you sure you want to change the base?
Conversation
TODO: Assets still need some work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see no justification for removing the dbMaxFileSize parameter in line 1535 of file src/init.cpp
I see no justification for deleting line #3178 of file src/validation.cpp: "assert(view.GetBestBlock() == pindexDelete->GetBlockHash());"
I have not completed reviewing the RVN-only changes in src/rpc/assets.cpp, src/rpc/rawtransactions.cpp, or src/txmempool.cpp
I question whether this type of PR is worthwhile for us to spend our limited resources on since although it may be "better" programming style, it doesn't fix any known problems, it changes consensus code, it takes significant effort, and there was even debate in bitcoin that some of these changes could potentially be risky.
* pcoinscatcher (CCoinsViewErrorCatcher) * pcoinsdbview (CCoinsViewDB) * pcoinsTip (CCoinsViewCache) * pblocktree (CBlockTreeDB) * Remove variables shadowing pcoinsdbview
From @ryanofsky:s #10973. Thanks!
d4df6f6
to
22890a7
Compare
Re-added the assert. |
Original-author: practicalswift
Use std::unique_ptr (C++11) where possible.
Rationale:
Avoid resource leaks (specifically: forgetting to delete an object created using new)
Avoid undefined behaviour (specifically: double delete:s)
Changes:
Resolving conflicts and adjustments for Ravencoin and assets.