mirror of
https://github.com/monero-project/monero.git
synced 2024-12-15 04:46:31 +02:00
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:
parent
439c4555e9
commit
03bc6100de
@ -177,8 +177,8 @@ bool HardFork::reorganize_from_block_height(uint64_t height)
|
|||||||
if (height >= db.height())
|
if (height >= db.height())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
//db.set_batch_transactions(true);
|
db.set_batch_transactions(true);
|
||||||
//db.batch_start();
|
db.batch_start();
|
||||||
|
|
||||||
versions.clear();
|
versions.clear();
|
||||||
|
|
||||||
@ -211,7 +211,7 @@ bool HardFork::reorganize_from_block_height(uint64_t height)
|
|||||||
add(get_block_version(h), h);
|
add(get_block_version(h), h);
|
||||||
}
|
}
|
||||||
|
|
||||||
//db.batch_stop();
|
db.batch_stop();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user