TestLockPointValidity
circular dependency followups #23649
pull glozow wants to merge 3 commits into bitcoin:master from glozow:22677-followups changing 3 files +12 −12-
glozow commented at 12:05 pm on December 2, 2021: memberFollowups from #22677 + clean up
-
remove unnecessary casts and use braced initialization b01784f027
-
glozow commented at 12:06 pm on December 2, 2021: memberCC @MarcoFalke, comments from #22677#pullrequestreview-820587394
-
glozow added the label Refactoring on Dec 2, 2021
-
in src/txmempool.cpp:651 in c1ba9e8dd8 outdated
648@@ -650,7 +649,7 @@ void CTxMemPool::removeForReorg(CChain& chain, std::function<bool(txiter)> check 649 RemoveStaged(setAllRemoves, false, MemPoolRemovalReason::REORG); 650 for (indexed_transaction_set::const_iterator it = mapTx.begin(); it != mapTx.end(); it++) { 651 LockPoints lp = it->GetLockPoints();
MarcoFalke commented at 12:40 pm on December 2, 2021:0 const LockPoints lp{it->GetLockPoints()};
MarcoFalke approvedMarcoFalke commented at 12:40 pm on December 2, 2021: memberNice. ACK
Left one nit in case you retouch
MarcoFalke commented at 2:34 pm on December 2, 2021: memberThoughts on this suggested diff?
0diff --git a/src/txmempool.cpp b/src/txmempool.cpp 1index 27fbb8acac..2cc0aa1e90 100644 2--- a/src/txmempool.cpp 3+++ b/src/txmempool.cpp 4@@ -5,6 +5,7 @@ 5 6 #include <txmempool.h> 7 8+#include <chain.h> 9 #include <coins.h> 10 #include <consensus/consensus.h> 11 #include <consensus/tx_verify.h> 12diff --git a/src/txmempool.h b/src/txmempool.h 13index c6e08a3ca5..15a57de922 100644 14--- a/src/txmempool.h 15+++ b/src/txmempool.h 16@@ -14,7 +14,6 @@ 17 #include <utility> 18 #include <vector> 19 20-#include <chain.h> 21 #include <coins.h> 22 #include <consensus/amount.h> 23 #include <indirectmap.h> 24@@ -26,12 +25,13 @@ 25 #include <util/epochguard.h> 26 #include <util/hasher.h> 27 28-#include <boost/multi_index_container.hpp> 29 #include <boost/multi_index/hashed_index.hpp> 30 #include <boost/multi_index/ordered_index.hpp> 31 #include <boost/multi_index/sequenced_index.hpp> 32+#include <boost/multi_index_container.hpp> 33 34 class CBlockIndex; 35+class CChain; 36 class CChainState; 37 extern RecursiveMutex cs_main; 38
change TestLockPointValidity to take a const reference
The lockpoints are not changed in this function. There is no reason to pass a pointer.
glozow force-pushed on Dec 2, 2021clean up txmempool includes ddd74ff65cMarcoFalke approvedMarcoFalke commented at 2:52 pm on December 2, 2021: memberre-ackglozow force-pushed on Dec 2, 2021glozow commented at 2:55 pm on December 2, 2021: memberOops forgot the txmempool.cpp include. Added suggestions, thanks @MarcoFalketheStack approvedtheStack commented at 3:16 pm on December 2, 2021: memberCode-review ACK ddd74ff65c471c5c25815ac0643d16ea0d51f58ffanquake merged this on Dec 3, 2021fanquake closed this on Dec 3, 2021
glozow deleted the branch on Dec 3, 2021sidhujag referenced this in commit 0898a382b7 on Dec 3, 2021RandyMcMillan referenced this in commit d28cf54723 on Dec 23, 2021Fabcien referenced this in commit bd99a74d3e on Nov 10, 2022Fabcien referenced this in commit 848f2f48c2 on Nov 10, 2022Fabcien referenced this in commit 3b8d42aff6 on Nov 10, 2022DrahtBot locked this on Dec 3, 2022Labels
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-11-23 09: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-11-23 09: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