aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-04-16 22:45:23 +0200
committerRiccardo Spagni <ric@spagni.net>2019-04-16 22:45:23 +0200
commitc5f64bf1702f0867cb7edd36c3c80a46b979d626 (patch)
tree22c2e7a794228cbe83b9a21615db785117f7bb11 /src/cryptonote_basic
parentMerge pull request #5442 (diff)
parenthardfork: remove "no hf version db" recreation check (diff)
downloadmonero-c5f64bf1702f0867cb7edd36c3c80a46b979d626.tar.xz
Merge pull request #5443
07dd5536 hardfork: remove "no hf version db" recreation check (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/hardfork.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/cryptonote_basic/hardfork.cpp b/src/cryptonote_basic/hardfork.cpp
index 61240ea37..d5710f727 100644
--- a/src/cryptonote_basic/hardfork.cpp
+++ b/src/cryptonote_basic/hardfork.cpp
@@ -185,26 +185,8 @@ void HardFork::init()
else
height = 1;
- bool populate = false;
- try
- {
- db.get_hard_fork_version(0);
- }
- catch (...) { populate = true; }
- if (populate) {
- MINFO("The DB has no hard fork info, reparsing from start");
- height = 1;
- }
- MDEBUG("reorganizing from " << height);
- if (populate) {
- reorganize_from_chain_height(height);
- // reorg will not touch the genesis block, use this as a flag for populating done
- db.set_hard_fork_version(0, original_version);
- }
- else {
- rescan_from_chain_height(height);
- }
- MDEBUG("reorganization done");
+ rescan_from_chain_height(height);
+ MDEBUG("init done");
}
uint8_t HardFork::get_block_version(uint64_t height) const