1
0
Fork 0
forked from lthn/blockchain

pre-download validation improved

This commit is contained in:
sowle 2020-03-13 07:44:03 +03:00
parent 70337d779d
commit 73c34713e3
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -80,7 +80,7 @@ namespace tools
};
tools::create_directories_if_necessary(working_folder);
bool r = cl.download_and_unzip(cb, downloading_file_path, url, 1000 /* timout */);
bool r = cl.download_and_unzip(cb, downloading_file_path, url, 1000 /* timout */, "GET", std::string(), 3 /* fails count */);
if (!r)
{
LOG_PRINT_RED("Download failed", LOG_LEVEL_0);
@ -212,6 +212,12 @@ namespace tools
target_core.deinit();
source_core.deinit();
boost::filesystem::remove_all(path_to_temp_datafolder, ec);
if (ec)
{
LOG_ERROR("Failed to remove all from " << path_to_temp_datafolder);
}
return true;
}
}