diff options
Diffstat (limited to 'src/cryptonote_basic/hardfork.cpp')
-rw-r--r-- | src/cryptonote_basic/hardfork.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/cryptonote_basic/hardfork.cpp b/src/cryptonote_basic/hardfork.cpp index 89bca2f09..61240ea37 100644 --- a/src/cryptonote_basic/hardfork.cpp +++ b/src/cryptonote_basic/hardfork.cpp @@ -266,11 +266,9 @@ bool HardFork::reorganize_from_chain_height(uint64_t height) bool HardFork::rescan_from_block_height(uint64_t height) { CRITICAL_REGION_LOCAL(lock); - db.block_txn_start(true); - if (height >= db.height()) { - db.block_txn_stop(); + db_rtxn_guard rtxn_guard(&db); + if (height >= db.height()) return false; - } versions.clear(); @@ -293,8 +291,6 @@ bool HardFork::rescan_from_block_height(uint64_t height) current_fork_index = voted; } - db.block_txn_stop(); - return true; } |