Skip to content

Commit

Permalink
hardfork: remove "no hf version db" recreation check
Browse files Browse the repository at this point in the history
This is now obsolete, and this removes the warning on startup
on a new db that confuses some people
  • Loading branch information
moneromooo-monero committed Apr 14, 2019
1 parent 3734592 commit 07dd553
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions src/cryptonote_basic/hardfork.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 07dd553

Please sign in to comment.