aboutsummaryrefslogtreecommitdiff
path: root/src/blockchain_utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/blockchain_utilities')
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp4
-rw-r--r--src/blockchain_utilities/blockchain_utilities.h1
-rw-r--r--src/blockchain_utilities/bootstrap_file.cpp4
3 files changed, 5 insertions, 4 deletions
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index 9afad95dc..4a180430f 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -316,9 +316,9 @@ int import_from_file(cryptonote::core& core, const std::string& import_file_path
MWARNING("WARNING: chunk_size " << chunk_size << " > BUFFER_SIZE " << BUFFER_SIZE);
throw std::runtime_error("Aborting: chunk size exceeds buffer size");
}
- if (chunk_size > 100000)
+ if (chunk_size > CHUNK_SIZE_WARNING_THRESHOLD)
{
- MINFO("NOTE: chunk_size " << chunk_size << " > 100000");
+ MINFO("NOTE: chunk_size " << chunk_size << " > " << CHUNK_SIZE_WARNING_THRESHOLD);
}
else if (chunk_size == 0) {
MFATAL("ERROR: chunk_size == 0");
diff --git a/src/blockchain_utilities/blockchain_utilities.h b/src/blockchain_utilities/blockchain_utilities.h
index af934bf29..6fb5e1131 100644
--- a/src/blockchain_utilities/blockchain_utilities.h
+++ b/src/blockchain_utilities/blockchain_utilities.h
@@ -34,6 +34,7 @@
// bounds checking is done before writing to buffer, but buffer size
// should be a sensible maximum
#define BUFFER_SIZE 1000000
+#define CHUNK_SIZE_WARNING_THRESHOLD 500000
#define NUM_BLOCKS_PER_CHUNK 1
#define BLOCKCHAIN_RAW "blockchain.raw"
diff --git a/src/blockchain_utilities/bootstrap_file.cpp b/src/blockchain_utilities/bootstrap_file.cpp
index d5bb37d93..2b1a5d6c7 100644
--- a/src/blockchain_utilities/bootstrap_file.cpp
+++ b/src/blockchain_utilities/bootstrap_file.cpp
@@ -436,10 +436,10 @@ uint64_t BootstrapFile::count_blocks(const std::string& import_file_path)
<< " height: " << h-1);
throw std::runtime_error("Aborting: chunk size exceeds buffer size");
}
- if (chunk_size > 100000)
+ if (chunk_size > CHUNK_SIZE_WARNING_THRESHOLD)
{
std::cout << refresh_string;
- MDEBUG("NOTE: chunk_size " << chunk_size << " > 100000" << " height: "
+ MDEBUG("NOTE: chunk_size " << chunk_size << " > " << CHUNK_SIZE_WARNING_THRESHOLD << " << height: "
<< h-1);
}
else if (chunk_size <= 0) {