Changeset View
Changeset View
Standalone View
Standalone View
src/test/validation_tests.cpp
Show All 34 Lines | |||||
BOOST_FIXTURE_TEST_SUITE(validation_tests, TestingSetup) | BOOST_FIXTURE_TEST_SUITE(validation_tests, TestingSetup) | ||||
/** Test that LoadExternalBlockFile works with the buffer size set | /** Test that LoadExternalBlockFile works with the buffer size set | ||||
below the size of a large block. Currently, LoadExternalBlockFile has the | below the size of a large block. Currently, LoadExternalBlockFile has the | ||||
buffer size for CBufferedFile set to 2 * MAX_TX_SIZE. Test with a value | buffer size for CBufferedFile set to 2 * MAX_TX_SIZE. Test with a value | ||||
of 10 * MAX_TX_SIZE. */ | of 10 * MAX_TX_SIZE. */ | ||||
BOOST_AUTO_TEST_CASE(validation_load_external_block_file) { | BOOST_AUTO_TEST_CASE(validation_load_external_block_file) { | ||||
fs::path tmpfile_name = | fs::path tmpfile_name = | ||||
pathTemp / strprintf("vlebf_test_%lu_%i", (unsigned long)GetTime(), | SetDataDir("validation_load_external_block_file") / "block.dat"; | ||||
(int)(InsecureRandRange(100000))); | |||||
FILE *fp = fopen(tmpfile_name.string().c_str(), "wb+"); | FILE *fp = fopen(tmpfile_name.string().c_str(), "wb+"); | ||||
BOOST_CHECK(fp != nullptr); | BOOST_CHECK(fp != nullptr); | ||||
const Config &config = GetConfig(); | const Config &config = GetConfig(); | ||||
const CChainParams &chainparams = config.GetChainParams(); | const CChainParams &chainparams = config.GetChainParams(); | ||||
Show All 31 Lines |