mirror of
https://github.com/monero-project/monero.git
synced 2025-08-12 01:20:11 -04:00
read txn/cursor stuff
Could wrap more later.
This commit is contained in:
parent
86a7f2b1e7
commit
8cc7a36f0b
8 changed files with 339 additions and 166 deletions
|
@ -254,8 +254,11 @@ bool HardFork::reorganize_from_chain_height(uint64_t height)
|
|||
bool HardFork::rescan_from_block_height(uint64_t height)
|
||||
{
|
||||
CRITICAL_REGION_LOCAL(lock);
|
||||
if (height >= db.height())
|
||||
db.block_txn_start(true);
|
||||
if (height >= db.height()) {
|
||||
db.block_txn_stop();
|
||||
return false;
|
||||
}
|
||||
|
||||
versions.clear();
|
||||
|
||||
|
@ -273,6 +276,7 @@ bool HardFork::rescan_from_block_height(uint64_t height)
|
|||
current_fork_index = 0;
|
||||
while (current_fork_index + 1 < heights.size() && heights[current_fork_index].version != lastv)
|
||||
++current_fork_index;
|
||||
db.block_txn_stop();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue