backport: Use std::unique_ptr (C++11) where possible (bitcoin #11043)#1165
backport: Use std::unique_ptr (C++11) where possible (bitcoin #11043)#1165fdoving wants to merge 14 commits intoRavenProject:developfrom
Conversation
|
TODO: Assets still need some work. |
hans-schmidt
left a comment
There was a problem hiding this comment.
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.