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.
This commit is contained in:
moneromooo-monero 2015-10-16 19:39:59 +01:00
parent 439c4555e9
commit 03bc6100de
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
1 changed files with 3 additions and 3 deletions

View File

@ -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;
}