Add coinstatsindex_unclean_shutdown test

This commit is contained in:
Ryan Ofsky
2022-02-22 14:48:57 -05:00
committed by Martin Zumsande
parent eb6cc05da3
commit 691d45fdc8
4 changed files with 69 additions and 7 deletions

View File

@@ -7,6 +7,7 @@
#include <util/check.h>
#include <util/time.h>
#include <validation.h>
#include <validationinterface.h>
void TestChainState::ResetIbd()
{
@@ -20,3 +21,8 @@ void TestChainState::JumpOutOfIbd()
m_cached_finished_ibd = true;
Assert(!IsInitialBlockDownload());
}
void ValidationInterfaceTest::BlockConnected(CValidationInterface& obj, const std::shared_ptr<const CBlock>& block, const CBlockIndex* pindex)
{
obj.BlockConnected(block, pindex);
}

View File

@@ -7,6 +7,8 @@
#include <validation.h>
class CValidationInterface;
struct TestChainState : public CChainState {
/** Reset the ibd cache to its initial state */
void ResetIbd();
@@ -14,4 +16,10 @@ struct TestChainState : public CChainState {
void JumpOutOfIbd();
};
class ValidationInterfaceTest
{
public:
static void BlockConnected(CValidationInterface& obj, const std::shared_ptr<const CBlock>& block, const CBlockIndex* pindex);
};
#endif // BITCOIN_TEST_UTIL_VALIDATION_H