aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-07-11 12:32:49 -0700
committerwarptangent <warptangent@inbox.com>2015-07-11 23:54:14 -0700
commit699e4b3f65baf8bb2ddd2377dc74e2a3168c6244 (patch)
tree0324f61a96e588b41457835c3698faee702d893e
parentOptionally allow DB to know expected number of blocks at batch transaction start (diff)
downloadmonero-699e4b3f65baf8bb2ddd2377dc74e2a3168c6244.tar.xz
blockchain_utilities: Pass expected number of blocks when starting batch
-rw-r--r--src/blockchain_utilities/blockchain_converter.cpp4
-rw-r--r--src/blockchain_utilities/blockchain_import.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/blockchain_utilities/blockchain_converter.cpp b/src/blockchain_utilities/blockchain_converter.cpp
index 855dde644..d18ce8789 100644
--- a/src/blockchain_utilities/blockchain_converter.cpp
+++ b/src/blockchain_utilities/blockchain_converter.cpp
@@ -236,7 +236,7 @@ int main(int argc, char* argv[])
}
if (opt_batch)
- blockchain->batch_start();
+ blockchain->batch_start(db_batch_size);
uint64_t i = 0;
for (i = start_block; i < end_block + 1; ++i)
{
@@ -277,7 +277,7 @@ int main(int argc, char* argv[])
std::cout << "\r \r";
std::cout << "[- batch commit at height " << i + 1 << " -]" << ENDL;
blockchain->batch_stop();
- blockchain->batch_start();
+ blockchain->batch_start(db_batch_size);
std::cout << ENDL;
blockchain->show_stats();
}
diff --git a/src/blockchain_utilities/blockchain_import.cpp b/src/blockchain_utilities/blockchain_import.cpp
index aeed2b335..924b46d2d 100644
--- a/src/blockchain_utilities/blockchain_import.cpp
+++ b/src/blockchain_utilities/blockchain_import.cpp
@@ -254,7 +254,7 @@ int import_from_file(FakeCore& simple_core, std::string& import_file_path, uint6
}
if (use_batch)
- simple_core.batch_start();
+ simple_core.batch_start(db_batch_size);
LOG_PRINT_L0("Reading blockchain from bootstrap file...");
std::cout << ENDL;
@@ -482,7 +482,7 @@ int import_from_file(FakeCore& simple_core, std::string& import_file_path, uint6
// zero-based height
std::cout << ENDL << "[- batch commit at height " << h-1 << " -]" << ENDL;
simple_core.batch_stop();
- simple_core.batch_start();
+ simple_core.batch_start(db_batch_size);
std::cout << ENDL;
#if !defined(BLOCKCHAIN_DB) || (BLOCKCHAIN_DB == DB_LMDB)
simple_core.m_storage.get_db().show_stats();