validation.h raw

   1  // Copyright (c) 2020-2022 The Limenka developers
   2  // Distributed under the MIT software license, see the accompanying
   3  // file COPYING or http://www.opensource.org/licenses/mit-license.php.
   4  
   5  #ifndef LIMENKA_TEST_UTIL_VALIDATION_H
   6  #define LIMENKA_TEST_UTIL_VALIDATION_H
   7  
   8  #include <validation.h>
   9  
  10  class CValidationInterface;
  11  
  12  struct TestChainstateManager : public ChainstateManager {
  13      /** Reset the ibd cache to its initial state */
  14      void ResetIbd();
  15      /** Toggle IsInitialBlockDownload from true to false */
  16      void JumpOutOfIbd();
  17  };
  18  
  19  class ValidationInterfaceTest
  20  {
  21  public:
  22      static void BlockConnected(
  23          ChainstateRole role,
  24          CValidationInterface& obj,
  25          const std::shared_ptr<const CBlock>& block,
  26          const CBlockIndex* pindex);
  27  };
  28  
  29  #endif // LIMENKA_TEST_UTIL_VALIDATION_H
  30