mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-23 07:52:25 +00:00
hardfork: remove "no hf version db" recreation check
This is now obsolete, and this removes the warning on startup on a new db that confuses some people
This commit is contained in:
parent
37345921ec
commit
07dd55363c
1 changed files with 2 additions and 20 deletions
|
@ -185,26 +185,8 @@ void HardFork::init()
|
||||||
else
|
else
|
||||||
height = 1;
|
height = 1;
|
||||||
|
|
||||||
bool populate = false;
|
rescan_from_chain_height(height);
|
||||||
try
|
MDEBUG("init done");
|
||||||
{
|
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t HardFork::get_block_version(uint64_t height) const
|
uint8_t HardFork::get_block_version(uint64_t height) const
|
||||||
|
|
Loading…
Reference in a new issue