14 #include "validation.h"
18 #include <boost/test/unit_test.hpp>
25 fs::path testFile = fs::current_path() /
"data" / filename;
27 if (!fs::exists(testFile))
29 testFile = fs::path(BOOST_PP_STRINGIZE(TEST_DATA_DIR)) / filename;
32 FILE* fp =
fopen(testFile.string().c_str(),
"rb");
33 if (!fp)
return false;
35 fseek(fp, 8, SEEK_SET);
38 if (filein.
IsNull())
return false;
51 unsigned int tMay15 = 1368576000;
61 forkingBlock.
nTime = tMay15;
bool read_block(const std::string &filename, CBlock &block)
BOOST_AUTO_TEST_CASE(May15)
Non-refcounted RAII wrapper for FILE*.
bool IsNull() const
Return true if the wrapped FILE* is nullptr, false otherwise.
Capture information about block/transaction validation.
BOOST_AUTO_TEST_SUITE_END()
bool CheckBlock(int nHeight, const uint256 &hash, bool fMatchesCheckpoint)
Returns true if block passes checkpoint checks.
FILE * fopen(const fs::path &p, const char *mode)
RecursiveMutex cs_main
Global state.
#define BOOST_FIXTURE_TEST_SUITE(a, b)
#define BOOST_CHECK(expr)
void SetMockTime(int64_t nMockTimeIn)
For testing.