MINFO("Blockchain initialized. last block: "<<m_db->height()-1<<", "<<epee::misc_utils::get_time_interval_string(timestamp_diff)<<" time ago, current difficulty: "<<get_difficulty_for_next_block());
MINFO("Blockchain initialized. last block: "<<m_db->height()-1<<", "<<epee::misc_utils::get_time_interval_string(timestamp_diff)<<" time ago, current difficulty: "<<get_difficulty_for_next_block());
MGINFO("Initial popping done, top block: "<<top_id<<", top height: "<<top_height<<", block version: "<<(uint64_t)top_block.major_version);
break;
}
else
{
if(num_popped_blocks==0)
MGINFO("Current top block "<<top_id<<" at height "<<top_height<<" has version "<<(uint64_t)top_block.major_version<<" which disagrees with the ideal version "<<(uint64_t)ideal_hf_version);
if(num_popped_blocks%100==0)
MGINFO("Popping blocks... "<<top_height);
++num_popped_blocks;
blockpopped_block;
std::vector<transaction>popped_txs;
try
{
m_db->pop_block(popped_block,popped_txs);
}
// anything that could cause this to throw is likely catastrophic,
// so we re-throw
catch(conststd::exception&e)
{
MERROR("Error popping block from blockchain: "<<e.what());
throw;
}
catch(...)
{
MERROR("Error popping block from blockchain, throwing!");