Changeset View
Changeset View
Standalone View
Standalone View
src/test/validation_tests.cpp
Show First 20 Lines • Show All 86 Lines • ▼ Show 20 Lines | |||||
/** | /** | ||||
* Test that LoadExternalBlockFile works with the buffer size set below the | * Test that LoadExternalBlockFile works with the buffer size set below the | ||||
* size of a large block. Currently, LoadExternalBlockFile has the buffer size | * size of a large block. Currently, LoadExternalBlockFile has the buffer size | ||||
* for CBufferedFile set to 2 * MAX_TX_SIZE. Test with a value of | * for CBufferedFile set to 2 * MAX_TX_SIZE. Test with a value of | ||||
* 10 * MAX_TX_SIZE. | * 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 = GetDataDir() / "block.dat"; | ||||
SetDataDir("validation_load_external_block_file") / "block.dat"; | |||||
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 30 Lines |