circular dependency followups #23649

pull glozow wants to merge 3 commits into bitcoin:master from glozow:22677-followups changing 3 files +12 −12
  1. glozow commented at 12:05 pm on December 2, 2021: member
    Followups from #22677 + clean up TestLockPointValidity
  2. remove unnecessary casts and use braced initialization b01784f027
  3. glozow commented at 12:06 pm on December 2, 2021: member
    CC @MarcoFalke, comments from #22677#pullrequestreview-820587394
  4. glozow added the label Refactoring on Dec 2, 2021
  5. 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()};
    
  6. MarcoFalke approved
  7. MarcoFalke commented at 12:40 pm on December 2, 2021: member

    Nice. ACK

    Left one nit in case you retouch

  8. MarcoFalke commented at 2:34 pm on December 2, 2021: member

    Thoughts 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 
    
  9. change TestLockPointValidity to take a const reference
    The lockpoints are not changed in this function.
    There is no reason to pass a pointer.
    c4efc4db54
  10. glozow force-pushed on Dec 2, 2021
  11. clean up txmempool includes ddd74ff65c
  12. MarcoFalke approved
  13. MarcoFalke commented at 2:52 pm on December 2, 2021: member
    re-ack
  14. glozow force-pushed on Dec 2, 2021
  15. glozow commented at 2:55 pm on December 2, 2021: member
    Oops forgot the txmempool.cpp include. Added suggestions, thanks @MarcoFalke
  16. theStack approved
  17. theStack commented at 3:16 pm on December 2, 2021: member
    Code-review ACK ddd74ff65c471c5c25815ac0643d16ea0d51f58f
  18. fanquake merged this on Dec 3, 2021
  19. fanquake closed this on Dec 3, 2021

  20. glozow deleted the branch on Dec 3, 2021
  21. sidhujag referenced this in commit 0898a382b7 on Dec 3, 2021
  22. RandyMcMillan referenced this in commit d28cf54723 on Dec 23, 2021
  23. Fabcien referenced this in commit bd99a74d3e on Nov 10, 2022
  24. Fabcien referenced this in commit 848f2f48c2 on Nov 10, 2022
  25. Fabcien referenced this in commit 3b8d42aff6 on Nov 10, 2022
  26. DrahtBot locked this on Dec 3, 2022

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-27 03:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me