aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities/bootstrap_file.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-27 14:11:35 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-27 14:11:35 +0100
commit80d7c6c7305e01c6be1c1cde72e18bc04371914d (patch)
tree70bac1c5b936defd35bd51b01d95e3b01794d562 /src/blockchain_utilities/bootstrap_file.cpp
parentMerge pull request #3977 (diff)
downloadmonero-80d7c6c7305e01c6be1c1cde72e18bc04371914d.tar.xz
blockchain_utilities: report file offset where a read error occurs
Diffstat (limited to '')
-rw-r--r--src/blockchain_utilities/bootstrap_file.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/blockchain_utilities/bootstrap_file.cpp b/src/blockchain_utilities/bootstrap_file.cpp
index aa85e5e53..ba2697226 100644
--- a/src/blockchain_utilities/bootstrap_file.cpp
+++ b/src/blockchain_utilities/bootstrap_file.cpp
@@ -400,18 +400,18 @@ uint64_t BootstrapFile::count_bytes(std::ifstream& import_file, uint64_t blocks,
{
std::cout << refresh_string;
MWARNING("WARNING: chunk_size " << chunk_size << " > BUFFER_SIZE " << BUFFER_SIZE
- << " height: " << h-1);
+ << " height: " << h-1 << ", offset " << bytes_read);
throw std::runtime_error("Aborting: chunk size exceeds buffer size");
}
if (chunk_size > CHUNK_SIZE_WARNING_THRESHOLD)
{
std::cout << refresh_string;
MDEBUG("NOTE: chunk_size " << chunk_size << " > " << CHUNK_SIZE_WARNING_THRESHOLD << " << height: "
- << h-1);
+ << h-1 << ", offset " << bytes_read);
}
else if (chunk_size <= 0) {
std::cout << refresh_string;
- MDEBUG("ERROR: chunk_size " << chunk_size << " <= 0" << " height: " << h-1);
+ MDEBUG("ERROR: chunk_size " << chunk_size << " <= 0" << " height: " << h-1 << ", offset " << bytes_read);
throw std::runtime_error("Aborting");
}
// skip to next expected block size value