#ifndef BITCOIN_TEST_UTIL_VALIDATION_H
#define BITCOIN_TEST_UTIL_VALIDATION_H
#include <validation.h>
namespace node {
class BlockManager;
}
class CValidationInterface;
struct TestBlockManager : public node::BlockManager {
void CleanupForFuzzing();
};
struct TestChainstateManager : public ChainstateManager {
void DisableNextWrite();
void ResetIbd();
void JumpOutOfIbd();
void InvalidBlockFound(CBlockIndex* pindex, const BlockValidationState& state) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
void InvalidChainFound(CBlockIndex* pindexNew) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
CBlockIndex* FindMostWorkChain() EXCLUSIVE_LOCKS_REQUIRED(cs_main);
void ResetBestInvalid() EXCLUSIVE_LOCKS_REQUIRED(cs_main);
};
class ValidationInterfaceTest
{
public:
static void BlockConnected(
const kernel::ChainstateRole& role,
CValidationInterface& obj,
const std::shared_ptr<const CBlock>& block,
const CBlockIndex* pindex);
};
#endif