diff options
Diffstat (limited to 'src/cryptonote_core/hardfork.cpp')
-rw-r--r-- | src/cryptonote_core/hardfork.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cryptonote_core/hardfork.cpp b/src/cryptonote_core/hardfork.cpp index 50da70050..546af2076 100644 --- a/src/cryptonote_core/hardfork.cpp +++ b/src/cryptonote_core/hardfork.cpp @@ -222,7 +222,7 @@ bool HardFork::reorganize_from_block_height(uint64_t height) return false; db.set_batch_transactions(true); - db.batch_start(); + bool stop_batch = db.batch_start(); versions.clear(); @@ -250,7 +250,8 @@ bool HardFork::reorganize_from_block_height(uint64_t height) add(db.get_block_from_height(h), h); } - db.batch_stop(); + if (stop_batch) + db.batch_stop(); return true; } |