From a2c5398583897c5505121856849fd0977d62abfc Mon Sep 17 00:00:00 2001 From: moneromooo-monero Date: Fri, 16 Oct 2015 19:39:59 +0100 Subject: [PATCH] hardfork: use DB transactions when reorganizing It speeds up a lot, which can be significant when reorganizing from the genesis block to create the hard fork data. --- src/cryptonote_core/hardfork.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cryptonote_core/hardfork.cpp b/src/cryptonote_core/hardfork.cpp index fee607bcf..77839678c 100644 --- a/src/cryptonote_core/hardfork.cpp +++ b/src/cryptonote_core/hardfork.cpp @@ -177,8 +177,8 @@ bool HardFork::reorganize_from_block_height(uint64_t height) if (height >= db.height()) return false; - //db.set_batch_transactions(true); - //db.batch_start(); + db.set_batch_transactions(true); + db.batch_start(); versions.clear(); @@ -211,7 +211,7 @@ bool HardFork::reorganize_from_block_height(uint64_t height) add(get_block_version(h), h); } - //db.batch_stop(); + db.batch_stop(); return true; }