diff options
| author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-10-16 19:39:59 +0100 |
|---|---|---|
| committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2015-10-17 00:11:13 +0100 |
| commit | 03bc6100de2feb66e821c08b16ac1200209fc1e2 (patch) | |
| tree | 9b614cd0f09de4afaf890e96b877e8b8e218b880 | |
| parent | 439c4555e99bbd1869fc6a7a96d7a5cb4a72c028 (diff) | |
| download | monzero-core-03bc6100de2feb66e821c08b16ac1200209fc1e2.tar.gz monzero-core-03bc6100de2feb66e821c08b16ac1200209fc1e2.tar.xz monzero-core-03bc6100de2feb66e821c08b16ac1200209fc1e2.zip | |
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.
| -rw-r--r-- | src/cryptonote_core/hardfork.cpp | 6 |
1 files 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; } |
