BlockManager is responsible for reading and writing block(headers). So move it to the existing blockstorage module in node. Also, move validation code unrelated to block-storage out from BlockManager.
        
      BlockManager is responsible for reading and writing block(headers). So move it to the existing blockstorage module in node. Also, move validation code unrelated to block-storage out from BlockManager.
        
      The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Reviewers, this pull request conflicts with the following ones:
-Wold-style-cast by PastaPastaPasta)If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
717@@ -718,7 +718,9 @@ bool MemPoolAccept::PreChecks(ATMPArgs& args, Workspace& ws)
718     if (!CheckSequenceLocks(m_active_chainstate.m_chain.Tip(), m_view, tx, STANDARD_LOCKTIME_VERIFY_FLAGS, &lp))
719         return state.Invalid(TxValidationResult::TX_PREMATURE_SPEND, "non-BIP68-final");
720 
721-    if (!Consensus::CheckTxInputs(tx, state, m_view, m_active_chainstate.m_blockman.GetSpendHeight(m_view), ws.m_base_fees)) {
722+    assert(m_active_chainstate.m_blockman.LookupBlockIndex(m_view.GetBestBlock()) == m_active_chainstate.m_chain.Tip());
fa646a5ae9b39b7987d5701aec55a54ae4ec80ed
nit, move after L706.
427@@ -427,6 +428,7 @@ class BlockManager
428      *                                     which we've downloaded all transactions.
429      */
430     bool LoadBlockIndex(
431+        CBlockIndex*& best_invalid,
faabaa8654c9446846e79ac5ae2edf70e0ae6d98
Update doc above? Make it the 2nd arg?
Can be reviewed with --color-moved=dimmed-zebra
Can be reviewed with --word-diff-regex=. -U0 --ignore-all-space
        
        
          
            
              
              MarcoFalke
            
          
            
              
              DrahtBot
            
          
            
              
              promag
            
          
            
              
              ryanofsky
            
          
        
          Labels
          
          
  
    
Refactoring