Make mapBlockIndex and chainActive and all CBlockIndex*es const outside of validation/CChainState #10692
pull TheBlueMatt wants to merge 26 commits into bitcoin:master from TheBlueMatt:2017-04-const-mapblockindex changing 21 files +520 −341-
TheBlueMatt commented at 4:49 pm on June 28, 2017: memberThis is based on #10279 and is all just pretty mechanical (largely scripted) changes to make mapBlockIndex/chainActive/CBlockIndex*es const outside of validation.cpp/CChainState!
-
practicalswift commented at 6:01 pm on June 28, 2017: contributorConcept ACK. Needs rebase! :-)
-
fanquake added the label Refactoring on Jun 29, 2017
-
Make DisconnectBlock unaware of where undo data resides on disk f2902136aa
-
Move txindex/undo data disk location stuff out of ConnectBlock 8559637128
-
Move block writing out of AcceptBlock dc461681ff
-
Create initial CChainState to hold chain state information a6e978884e
-
Move some additional variables into CChainState private 21ec3737e5
-
Avoid calling GetSerializeSize on each tx in a block if !fTxIndex 3b78b2d9ef
-
Expose const CBlockIndexes in validation.h, update wallet rescan 32f3b1df7b
-
Use const CBlockIndex* instead of const_cast in qt/clientmodel bcc21f2421
-
scripted-diff: constify CBlockIndex* outside of validation
-BEGIN VERIFY SCRIPT- sed -i "s/\(const \)*CBlockIndex/const CBlockIndex/" src/qt/transactionrecord.cpp src/rest.cpp src/miner.cpp src/init.cpp src/rpc/*.cpp src/wallet/*.cpp -END VERIFY SCRIPT-
-
scripted-diff: Use BlockMap::const_iterators outside of validation
-BEGIN VERIFY SCRIPT- sed -i "s/BlockMap::iterator/BlockMap::const_iterator/" src/rpc/*.cpp src/wallet/*.cpp src/qt/transactionrecord.cpp src/net_processing.cpp -END VERIFY SCRIPT-
-
scripted-diff: mapBlockIndex[] -> .at outside of validation
-BEGIN VERIFY SCRIPT- sed -i "s/mapBlockIndex\[\(.*\)\]/mapBlockIndex.at(\1)/g" src/rest.cpp src/wallet/*.cpp src/rpc/*.cpp -END VERIFY SCRIPT-
-
Move mapBlockIndex cleanup inside CChainState dd8ed98a00
-
Move chainActive tip setting into CChainState from LoadBlockIndexDB ac9af80088
-
Make mapBlockIndex const in validation.h bda2d156b9
-
Create new "NonConstBlockMap" typdef for CChainState c1ea0aa6f8
-
scripted-diff: Use NonConstBlockMap type for validation iterators
-BEGIN VERIFY SCRIPT- sed -i "s/BlockMap::iterator/NonConstBlockMap::iterator/" src/validation.cpp -END VERIFY SCRIPT-
-
Move NonConstBlockMap into CChainState ffaebe1d68
-
Make mapBlockIndex's CBlockIndex* const outside of CChainState cd83402f7e
-
Make some CBlockIndex*s in validation const where appropriate e26d8997b0
-
Make some CBlockIndex*es in wallet_tests const 9b97cee6d7
-
Add a const_cast'ed reference to chainActive in miner_tests 0573c1486f
-
scripted-diff: Use nonCosntChainActive in miner_tests
-BEGIN VERIFY SCRIPT- sed -i "s/chainActive\./nonConstChainActive./" src/test/miner_tests.cpp -END VERIFY SCRIPT-
-
Make VerifyDB a CChainState member instead of a loose class 2606cebc0b
-
Use chainstate's CBlockIndexes in sequence lock calculation f5b8e70a82
-
Make CChain only return const CBlockIndex* in const functions b8f5e4da97
-
Make chainActive and pindexBestHeader const CBlockIndex*s bbe2069406
-
TheBlueMatt force-pushed on Aug 15, 2017
-
TheBlueMatt commented at 10:09 pm on August 15, 2017: memberRebased.
-
TheBlueMatt commented at 7:41 pm on March 27, 2018: memberSuperceded.
-
TheBlueMatt closed this on Mar 27, 2018
-
MarcoFalke locked this on Sep 8, 2021
Labels
Refactoring
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 15:12 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-22 15:12 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me